Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Steven D'Aprano
On Fri, 24 May 2013 22:39:06 -0700, lokeshkoppaka wrote: On Saturday, May 25, 2013 10:54:01 AM UTC+5:30, Chris Angelico wrote: In that case, you're not really ordering them, you're counting them. Look at the collections module; you can very easily figure out how many of each there are, and

Re: authentication with python-ldap

2013-05-25 Thread dieter
avazqu...@grm.uci.cu writes: import ldap conn = ldap.initialize(ldap://ldap.uci.cu;) conn.protocol_version = ldap.VERSION3 conn.simple_bind_s( uid=xxx,dc=uci,dc=cu, xxx ) Result: Traceback (most recent call last): File console, line 1, in module File

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread lokeshkoppaka
On Saturday, May 25, 2013 11:27:38 AM UTC+5:30, Steven D'Aprano wrote: On Fri, 24 May 2013 22:39:06 -0700, lokeshkoppaka wrote: On Saturday, May 25, 2013 10:54:01 AM UTC+5:30, Chris Angelico wrote: In that case, you're not really ordering them, you're counting them. Look at

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sat, May 25, 2013 at 4:05 PM, lokeshkopp...@gmail.com wrote: ya steven i had done the similar logic but thats not satisfying my professor he had given the following constrains 1. No in-built functions should be used 2. we are expecting a O(n) solution 3. Don't use count method And now

Re: Python Magazine

2013-05-25 Thread zoom
But why would anyone want to use IPv6? On 05/25/2013 05:48 AM, Chris Angelico wrote: On Sat, May 25, 2013 at 1:35 PM, Roy Smithr...@panix.com wrote: Python 3 vs. IPv6: who will win the race for early adoption? I think Py3 is winning that one so far. But really, both need to get moving.

Re: Python Magazine

2013-05-25 Thread Chris Angelico
On Sat, May 25, 2013 at 4:38 PM, zoom z...@yahoo.com wrote: But why would anyone want to use IPv6? I hope you're not serious :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
Date: Fri, 24 May 2013 23:05:17 -0700 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: lokeshkopp...@gmail.com To: python-list@python.org [...] ya steven i had done the similar logic but thats not

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sat, May 25, 2013 at 5:53 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Date: Fri, 24 May 2013 23:05:17 -0700 1. No in-built functions should be used count[2] = len(l) Fail! :) ChrisA --

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
Date: Sat, 25 May 2013 18:28:32 +1000 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: ros...@gmail.com To: python-list@python.org On Sat, May 25, 2013 at 5:53 PM, Carlos Nepomuceno

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sat, May 25, 2013 at 6:43 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: lol I forgot to include this monkey patch! ;) def length(l): x=0 y=l[:] while y: x+=1 y.pop() return x Nice. Now eliminate abs

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
lol def absolute(x):     return x if x0 else -x def reach(x):     y=[]     z=0     while zx:     y.append(z)     z+=1     return y Date: Sat, 25 May 2013 18:47:24 +1000 Subject: Re: help how to sort a list in order of 'n' in python without

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sat, May 25, 2013 at 6:54 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: lol def absolute(x): return x if x0 else -x def reach(x): y=[] z=0 while zx: y.append(z) z+=1 return y Very good. You are now in a position to get past the

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
Date: Sat, 25 May 2013 19:01:09 +1000 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: ros...@gmail.com To: python-list@python.org [...] Very good. You are now in a position to get past the

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sat, May 25, 2013 at 7:10 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Date: Sat, 25 May 2013 19:01:09 +1000 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: ros...@gmail.com To:

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
lol http://search.dilbert.com/comic/Random%20Nine Date: Sat, 25 May 2013 19:14:57 +1000 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: ros...@gmail.com To: python-list@python.org On Sat, May

Py_Initialize and Py_Finalize and MatPlotlib

2013-05-25 Thread Rene Grothmann
This is a known problem, but I want to ask the experts for the best way to solve it for me. I have a project (Euler Math Toolbox), which runs Python as a script language. For this, a library module python.dll is loaded at run time, which is linked against python27.lib. Then Py_Initialize is

Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-25 Thread neil.suffi...@gmail.com
If you are talking about accessing a web page, rather than an image, then you want to do what is known as screen scraping. One of the best tools for this is called BeautifulSoup. http://www.crummy.com/software/BeautifulSoup/ -- http://mail.python.org/mailman/listinfo/python-list

Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-25 Thread neil.suffi...@gmail.com
If you are talking about accessing a web page, rather than an image, then what you want to do is known as 'screen scraping'. One of the best tools for this is called BeautifulSoup. http://www.crummy.com/software/BeautifulSoup/ -- http://mail.python.org/mailman/listinfo/python-list

Text-to-Sound or Vice Versa (Method NOT the source code)

2013-05-25 Thread Rakshith Nayak
Always wondered how sound is generated from text. Googling couldn't help. Devs having knowledge about this could provide, the information, Links, URLs or anything that could help. Helpful for those who want to dig to basics first before Coding --

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Mark Lawrence
On 25/05/2013 09:54, Carlos Nepomuceno wrote: lol def absolute(x): return x if x0 else -x def reach(x): y=[] z=0 while zx: y.append(z) z+=1 return y In my book this is another fail as lists are inbuilt (yuck!) and so is the add function that'll be

Re: Text-to-Sound or Vice Versa (Method NOT the source code)

2013-05-25 Thread Günther Dietrich
Rakshith Nayak rnyk1...@gmail.com wrote: Always wondered how sound is generated from text. Googling couldn't help. Devs having knowledge about this could provide, the information, Links, URLs or anything that could help. Perhaps try 'text to speech' instead of 'text to sound'? Best

Learning Python

2013-05-25 Thread Asad Hasan
Hi All , I have started leaning Python through web . Would like to know if I should follow any book so that basics become clear with examples also want to know like in perl i use to invoke perl -d to get a debugged output is there any option in python. THanks, --

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Roy Smith
In article 78192328-b31b-49d9-9cd6-ec742c092...@googlegroups.com, lokeshkopp...@gmail.com wrote: On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote: i need to write a code which can sort the list in order of 'n' without use builtin functions can anyone help me how

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Roy Smith
In article 74e33270-a79a-4878-a400-8a6cda663...@googlegroups.com, lokeshkopp...@gmail.com wrote: ya steven i had done the similar logic but thats not satisfying my professor he had given the following constrains 1. No in-built functions should be used 2. we are expecting a O(n) solution

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Dave Angel
On 05/25/2013 10:03 AM, Roy Smith wrote: In article 74e33270-a79a-4878-a400-8a6cda663...@googlegroups.com, lokeshkopp...@gmail.com wrote: ya steven i had done the similar logic but thats not satisfying my professor he had given the following constrains 1. No in-built functions should be

Re: Python Magazine

2013-05-25 Thread Steven D'Aprano
On Sat, 25 May 2013 16:41:58 +1000, Chris Angelico wrote: On Sat, May 25, 2013 at 4:38 PM, zoom z...@yahoo.com wrote: But why would anyone want to use IPv6? I hope you're not serious :) He's planning to drop off the Internet once the IP address run out. -- Steven --

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Steven D'Aprano
On Sat, 25 May 2013 19:14:57 +1000, Chris Angelico wrote: def random_number(): return 7 I call shenanigans! That value isn't generated randomly, you just made it up! I rolled a die *hundreds* of times and not once did it come up seven! -- Steven --

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Steven D'Aprano
On Fri, 24 May 2013 23:05:17 -0700, lokeshkoppaka wrote: On Saturday, May 25, 2013 11:27:38 AM UTC+5:30, Steven D'Aprano wrote: tally = 0 for item in list_of_items: if item == 0: tally = tally + 1 print The number of zeroes equals, tally ya steven i had done the similar

Re: Learning Python

2013-05-25 Thread Steven D'Aprano
On Sat, 25 May 2013 18:11:11 +0530, Asad Hasan wrote: I have started leaning Python through web . Would like to know if I should follow any book so that basics become clear with examples Reading books is a good thing to do. also want to know like in perl i use to invoke perl -d to get a

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Fábio Santos
On 25 May 2013 15:35, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 25 May 2013 19:14:57 +1000, Chris Angelico wrote: def random_number(): return 7 I call shenanigans! That value isn't generated randomly, you just made it up! I rolled a die *hundreds* of times

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Jussi Piitulainen
Roy Smith writes: In article 78192328-b31b-49d9-9cd6-ec742c092...@googlegroups.com, lokeshkopp...@gmail.com wrote: On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote: i need to write a code which can sort the list in order of 'n' without use builtin functions

Re: Python Magazine

2013-05-25 Thread Daniel
All of the above, plus: - Best Pythonic tools for GUI - notorious projects (in science, education, NGOs, etc) using python Please keep us informed, and best wishes Daniel El 25/05/2013, a las 07:29, Michael Poeltl michael.poe...@univie.ac.at escribió: * DRJ Reddy rama29...@gmail.com

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Mark Lawrence
On 25/05/2013 15:28, Steven D'Aprano wrote: On Sat, 25 May 2013 19:14:57 +1000, Chris Angelico wrote: def random_number(): return 7 I call shenanigans! That value isn't generated randomly, you just made it up! I rolled a die *hundreds* of times and not once did it come up seven!

Re: Python Magazine

2013-05-25 Thread Roy Smith
In article mailman.2108.1369455962.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Also, comparison of Python flavors (CPython, PyPy, Cython, Stackles, etc.) Stackles? That sounds like breakfast cereal. New all-natural stackles, with 12 essential vitamins, plus fiber!

Re: Python Magazine

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 1:24 AM, Roy Smith r...@panix.com wrote: In article mailman.2108.1369455962.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Also, comparison of Python flavors (CPython, PyPy, Cython, Stackles, etc.) Stackles? That sounds like breakfast cereal.

Re: Python Magazine

2013-05-25 Thread Roy Smith
In article 51a0caac$0$30002$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 25 May 2013 16:41:58 +1000, Chris Angelico wrote: On Sat, May 25, 2013 at 4:38 PM, zoom z...@yahoo.com wrote: But why would anyone want to use IPv6? I

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 12:28 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 25 May 2013 19:14:57 +1000, Chris Angelico wrote: def random_number(): return 7 I call shenanigans! That value isn't generated randomly, you just made it up! I rolled a die *hundreds*

RE: Ldap module and base64 oncoding

2013-05-25 Thread Joseph L. Casale
Can you give an example of the code you have? I actually just overrode the regex used by the method in the LDIFWriter class to be far more broad about what it interprets as a safe string. I really need to properly handle reading, manipulating and writing non ascii data to solve this... Shame

Re: Text-to-Sound or Vice Versa (Method NOT the source code)

2013-05-25 Thread rusi
On May 25, 3:52 pm, Rakshith Nayak rnyk1...@gmail.com wrote: Always wondered how sound is generated from text. Googling couldn't help. Devs having knowledge about this could provide, the information, Links, URLs or anything that could help. Helpful for those who want to dig to basics first

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
To: python-list@python.org From: breamore...@yahoo.co.uk Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? Date: Sat, 25 May 2013 13:01:06 +0100 [...] In my book this is another fail as lists are inbuilt

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
From: steve+comp.lang.pyt...@pearwood.info Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? Date: Sat, 25 May 2013 14:28:33 + To: python-list@python.org On Sat, 25 May 2013 19:14:57 +1000, Chris

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
Date: Sun, 26 May 2013 01:41:58 +1000 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: ros...@gmail.com To: python-list@python.org On Sun, May 26, 2013 at 12:28 AM, Steven D'Aprano

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 3:17 AM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: def f(x): return x+1 or you can just go: f(roll_d6()) Hmm. Interesting. So now we have a question: Does adding 1 to a random number make it less random? It adds determinism to the number; can a number

RE: Learning Python

2013-05-25 Thread Carlos Nepomuceno
Date: Sat, 25 May 2013 18:11:11 +0530 Subject: Learning Python From: pythona...@gmail.com To: Python-list@python.org Hi All , I have started leaning Python through web . Would like to know if I should follow any book so that basics

RE: Python Magazine

2013-05-25 Thread Carlos Nepomuceno
From: r...@panix.com Subject: Re: Python Magazine Date: Sat, 25 May 2013 11:24:03 -0400 To: python-list@python.org In article mailman.2108.1369455962.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Also, comparison of Python

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
Date: Sun, 26 May 2013 03:23:44 +1000 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: ros...@gmail.com To: python-list@python.org On Sun, May 26, 2013 at 3:17 AM, Carlos Nepomuceno

RE: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Carlos Nepomuceno
Date: Fri, 24 May 2013 23:05:17 -0700 Subject: Re: help how to sort a list in order of 'n' in python without using inbuilt functions?? From: lokeshkopp...@gmail.com [...] ya steven i had done the similar logic but thats not satisfying my professor

Re: authentication with python-ldap

2013-05-25 Thread Jorge Alberto Diaz Orozco
I have been doing the same thing and I tried to use java for testing the credentials and they are correct. It works perfectly with java. I really don´t know what we´re doing wrong. You are accessing a protected operation of the LDAP server and it (the server) rejects it due to invalid

RE: authentication with python-ldap

2013-05-25 Thread Joseph L. Casale
I have been doing the same thing and I tried to use java for testing the credentials and they are correct. It works perfectly with java. I really don´t know what we´re doing wrong. You are accessing a protected operation of the LDAP server and it (the server) rejects it due to invalid

Re: Newbie question about evaluating raw_input() responses

2013-05-25 Thread Nobody
On Thu, 23 May 2013 17:20:19 +1000, Chris Angelico wrote: Aside: Why was PHP's /e regexp option ever implemented? Because it's a stupid idea, and that's the only requirement for a feature to be implemented in PHP. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question about evaluating raw_input() responses

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 4:27 AM, Nobody nob...@nowhere.com wrote: On Thu, 23 May 2013 17:20:19 +1000, Chris Angelico wrote: Aside: Why was PHP's /e regexp option ever implemented? Because it's a stupid idea, and that's the only requirement for a feature to be implemented in PHP. Hey, don't

Re: Newbie question about evaluating raw_input() responses

2013-05-25 Thread Fábio Santos
On 25 May 2013 19:37, Chris Angelico ros...@gmail.com wrote: Ah, who am I kidding. Be as rude as you like. I have to work with PHP all week. ChrisA -- http://mail.python.org/mailman/listinfo/python-list I have cried. -- http://mail.python.org/mailman/listinfo/python-list

Re: Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-25 Thread logan . c . graham
Sorry to be unclear -- it's a screenshot of the webpage, which is publicly accessible, but it contains sensitive information. A bad combination, admittedly, and something that'll be soon fixed. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Magazine

2013-05-25 Thread John Ladasky
On Saturday, May 25, 2013 8:30:19 AM UTC-7, Roy Smith wrote: From my phone, I can call any other phone anywhere in the world. But I can't talk directly to the file server in my neighbor's house across the street? Hmmm... I've been an advocate of IPv6, but... now you've got me thinking of

Re: Simple algorithm question - how to reorder a sequence economically

2013-05-25 Thread John Ladasky
On Friday, May 24, 2013 10:33:47 AM UTC-7, Yours Truly wrote: If you don't reshuffle p, it guarantees the maximum interval between reusing the same permutation. Of course, that comes at a certain price. Given two permutations p[x] and p[x+1], they will ALWAYS be adjacent, in every repetition

Re: Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-25 Thread John Ladasky
On Friday, May 24, 2013 4:36:35 PM UTC-7, Carlos Nepomuceno wrote: #to create the tables list tables=[[re.findall('TD(.*?)/TD',r,re.S) for r in re.findall('TR(.*?)/TR',t,re.S)] for t in re.findall('TABLE(.*?)/TABLE',page,re.S)] Pretty simple. Two nested list comprehensions, with regex

Re: Simple algorithm question - how to reorder a sequence economically

2013-05-25 Thread Roy Smith
In article 15a1bb3a-514c-454e-a966-243c84123...@googlegroups.com, John Ladasky john_lada...@sbcglobal.net wrote: Because someone's got to say it... The generation of random numbers is too important to be left to chance. ‹ Robert R. Coveyou Absolutely. I know just enough about random number

Re: Python Magazine

2013-05-25 Thread Roy Smith
In article 7cd17be8-d455-4db8-b8d0-ccc757db5...@googlegroups.com, John Ladasky john_lada...@sbcglobal.net wrote: On Saturday, May 25, 2013 8:30:19 AM UTC-7, Roy Smith wrote: From my phone, I can call any other phone anywhere in the world. But I can't talk directly to the file server

Re: Python Magazine

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 11:54 AM, Roy Smith r...@panix.com wrote: In article 7cd17be8-d455-4db8-b8d0-ccc757db5...@googlegroups.com, John Ladasky john_lada...@sbcglobal.net wrote: On Saturday, May 25, 2013 8:30:19 AM UTC-7, Roy Smith wrote: From my phone, I can call any other phone

Re: Python Magazine

2013-05-25 Thread John Ladasky
A perfectly fair point, Roy. It's just when you started suggesting connecting to your neighbor's file server -- well, that's not something that many people would ordinarily do. So, my mind leaped to the possibility of uninvited connections. Related question: would denial-of-service attacks

Automate Grabbing Email From Outlook On Shared Folder

2013-05-25 Thread darin . hensley
I am trying to automate Outlook mail client by retrieving a message with an attachment, using win32com. The message box is a shared folder that is not really underneath root folder inbox, so I had no success with inbox = mapi.GetDefaultFolder(6). However, I did have some success with:

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Steven D'Aprano
On Sun, 26 May 2013 01:41:58 +1000, Chris Angelico wrote: On Sun, May 26, 2013 at 12:28 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 25 May 2013 19:14:57 +1000, Chris Angelico wrote: def random_number(): return 7 I call shenanigans! That value isn't

Re: Python Magazine

2013-05-25 Thread Roy Smith
In article 8f19e20c-4f77-43dc-a732-4169e482d...@googlegroups.com, John Ladasky john_lada...@sbcglobal.net wrote: A perfectly fair point, Roy. It's just when you started suggesting connecting to your neighbor's file server -- well, that's not something that many people would ordinarily do.

Re: Python Magazine

2013-05-25 Thread Mark Lawrence
On 26/05/2013 02:58, Chris Angelico wrote: On Sun, May 26, 2013 at 11:54 AM, Roy Smith r...@panix.com wrote: In article 7cd17be8-d455-4db8-b8d0-ccc757db5...@googlegroups.com, John Ladasky john_lada...@sbcglobal.net wrote: On Saturday, May 25, 2013 8:30:19 AM UTC-7, Roy Smith wrote: From

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Steven D'Aprano
On Sun, 26 May 2013 03:23:44 +1000, Chris Angelico wrote: Does adding 1 to a random number make it less random? It adds determinism to the number; can a number be more deterministic while still no less random? Ah! I know. The answer comes from common sense: [snip spurious answer] I know

Re: Python Magazine

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 1:04 PM, John Ladasky john_lada...@sbcglobal.net wrote: A perfectly fair point, Roy. It's just when you started suggesting connecting to your neighbor's file server -- well, that's not something that many people would ordinarily do. So, my mind leaped to the

Re: Python Magazine

2013-05-25 Thread Steven D'Aprano
On Sat, 25 May 2013 21:54:43 -0400, Roy Smith wrote: Of course not every IPv6 endpoint will be able to talk to every other IPv6 endpoint, even if the both have globally unique addresses. But, the access controls will be implemented in firewalls with appropriately coded security policies.

CrazyHTTPd - HTTP Daemon in Python

2013-05-25 Thread cdorm245
This is a small little Project that I have started. Its a light little Web Server (HTTPd) coded in python. Requirements: Python 2.7 = And Linux / BSD. I believe this could work in a CLI Emulator in windows too. Welcome to check out the website powered by CrazyHTTPd:

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 1:09 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: You're right, all my dice are eight-sided and complex: 1+0i 1+1i 1-1i -1+0i -1+1i -1-1i :-) Now THAT is a dice of win! Now, I have here with me a set used for maths drill (to be entirely

RE: Python Magazine

2013-05-25 Thread Carlos Nepomuceno
Date: Sat, 25 May 2013 20:04:28 -0700 Subject: Re: Python Magazine From: john_lada...@sbcglobal.net To: python-list@python.org A perfectly fair point, Roy. It's just when you started suggesting connecting to your neighbor's file server -- well,

Re: Python Magazine

2013-05-25 Thread Steven D'Aprano
On Sun, 26 May 2013 11:58:09 +1000, Chris Angelico wrote: On Sun, May 26, 2013 at 11:54 AM, Roy Smith r...@panix.com wrote: Of course not every IPv6 endpoint will be able to talk to every other IPv6 endpoint, even if the both have globally unique addresses. But, the access controls will be

Re: CrazyHTTPd - HTTP Daemon in Python

2013-05-25 Thread Mark Lawrence
On 26/05/2013 04:55, cdorm...@gmail.com wrote: This is a small little Project that I have started. Its a light little Web Server (HTTPd) coded in python. Requirements: Python 2.7 = And Linux / BSD. I believe this could work in a CLI Emulator in windows too. Welcome to check out the website

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Dan Sommers
On Sun, 26 May 2013 03:38:12 +, Steven D'Aprano wrote: ... adding a constant to a random variable still leaves it equally random. Adding, multiplying, dividing or subtracting a constant from a random variable X just shifts the possible values X can take ... That's mathematically true, but

RE: CrazyHTTPd - HTTP Daemon in Python

2013-05-25 Thread Carlos Nepomuceno
Your code isn't threaded. I suggest you consider[1] and take that road! ;) Good luck! [1] http://bulk.fefe.de/scalable-networking.pdf To: python-list@python.org From: breamore...@yahoo.co.uk Subject: Re: CrazyHTTPd - HTTP Daemon in Python Date: Sun,

Re: help how to sort a list in order of 'n' in python without using inbuilt functions??

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 1:38 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 26 May 2013 03:23:44 +1000, Chris Angelico wrote: Does adding 1 to a random number make it less random? It adds determinism to the number; can a number be more deterministic while still no

Re: Python Magazine

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 2:01 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Date: Sat, 25 May 2013 20:04:28 -0700 Subject: Re: Python Magazine From: john_lada...@sbcglobal.net To: python-list@python.org A perfectly fair point, Roy. It's

Re: Python Magazine

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 2:03 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 26 May 2013 11:58:09 +1000, Chris Angelico wrote: On Sun, May 26, 2013 at 11:54 AM, Roy Smith r...@panix.com wrote: Of course not every IPv6 endpoint will be able to talk to every other IPv6

Re: CrazyHTTPd - HTTP Daemon in Python

2013-05-25 Thread cdorm245
On Sunday, May 26, 2013 12:21:46 PM UTC+8, Carlos Nepomuceno wrote: Your code isn't threaded. I suggest you consider[1] and take that road! ;) Good luck! [1] http://bulk.fefe.de/scalable-networking.pdf To: python-list@python.org From:

RE: Python Magazine

2013-05-25 Thread Carlos Nepomuceno
Date: Sun, 26 May 2013 14:31:57 +1000 Subject: Re: Python Magazine From: ros...@gmail.com To: python-list@python.org [...] I expect that IP blocks will be upgraded to /64 block blocks, if that starts being a problem. But it often won't, and specific

Re: Python Magazine

2013-05-25 Thread Chris Angelico
On Sun, May 26, 2013 at 3:00 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Date: Sun, 26 May 2013 14:31:57 +1000 Subject: Re: Python Magazine From: ros...@gmail.com To: python-list@python.org [...] I expect that IP blocks will be upgraded

[issue18054] Add more exception related assertions to unittest

2013-05-25 Thread Nick Coghlan
New submission from Nick Coghlan: When creating the error handling tests for the new ipaddress module, one of the things I added was an assertCleanError method on the test cases [1]. This is a wrapper around assertRaisesRegex which ensures that either no exception context is set, or if there

[issue12641] Remove -mno-cygwin from distutils

2013-05-25 Thread Roumen Petrov
Roumen Petrov added the comment: Oscar Benjamin wrote: [SNIP]The option was only ever meaningful in cygwin's gcc 3.x and was always an error in 4.x. May be . It seems to me flag was removed in GCC 4.5 . -- ___ Python tracker

[issue12641] Remove -mno-cygwin from distutils

2013-05-25 Thread Seppo Yli-Olli
Seppo Yli-Olli added the comment: Since Renata's ERRATA was unclear to whether or not this was *actually* removed (please point to a changeset if the option was removed): If the option is no longer required by Pidgin and that was the original reason to have it in the first, there's really no

[issue18032] set methods should specify whether they consume iterators lazily

2013-05-25 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18032 ___ ___ Python-bugs-list

[issue18033] Example for Profile Module shows incorrect method

2013-05-25 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18033 ___ ___ Python-bugs-list

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2013-05-25 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18035 ___ ___ Python-bugs-list

[issue18036] How do I create a .pyc file? FAQ entry is out of date

2013-05-25 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18036 ___ ___ Python-bugs-list

[issue18043] No mention of `match.regs` in `re` documentation

2013-05-25 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18043 ___ ___ Python-bugs-list

[issue18042] Provide enum.unique class decorator

2013-05-25 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18042 ___ ___ Python-bugs-list

[issue18047] Descriptors get invoked in old-style objects and classes

2013-05-25 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18047 ___ ___ Python-bugs-list

[issue12641] Remove -mno-cygwin from distutils

2013-05-25 Thread Seppo Yli-Olli
Seppo Yli-Olli added the comment: ERRATA Misunderstood the meaning of ERRATA, please ignore my last post. Roumen Petrov wrote: Where is written that compiler is gcc ? Yes this is current distutils code but please review my set of patches I kinda like the using --target-help for finding out

[issue18046] Simplify and clarify logging internals

2013-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5629bf4c6bba by Vinay Sajip in branch 'default': Closes #18046: Simplified logging internals relating to levels and their names. Thanks to Alex Gaynor for the patch. http://hg.python.org/cpython/rev/5629bf4c6bba -- nosy: +python-dev

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is another approach to make tp_subclasses a dict, rather than a list. I'll let you benchmark and choose whichever you prefer :) -- nosy: +gvanrossum, rhettinger Added file: http://bugs.python.org/file30364/subclasses_dict.patch

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-05-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- priority: critical - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17997 ___ ___

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: One question: I saw you clearing exceptions in the tp_clear() function, isn't it better to use PyErr_PrintUnraisable()? You're right, that would be better. I was just being lazy. -- ___ Python tracker

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Looks good, I'll give it a spin. This is probably smarter then trying to do tricks with lists. One question: I saw you clearing exceptions in the tp_clear() function, isn't it better to use PyErr_PrintUnraisable()? Is there a guideline to when to

[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2013-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: As for partial writes, I'm not sure if it's backwards compatible to turn them on by default, but it might be nice if the option were exposed. Partial writes may have less benefit in Python than in C since we'd have to reallocate and copy a string instead of

[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2013-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 60310223d075 by Antoine Pitrou in branch 'default': Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL sockets. http://hg.python.org/cpython/rev/60310223d075 -- nosy: +python-dev ___

[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2013-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I should have fixed the original issue. If you want to see an option to enable partial writes, please open a separate issue. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed

[issue7940] re.finditer and re.findall should support negative end positions

2013-05-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Library (Lib) stage: test needed - needs patch versions: +Python 3.4 -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7940

  1   2   3   >