[RELEASE] Python 2.7.8

2014-07-01 Thread Benjamin Peterson
Greetings, I have the distinct privilege of informing you that the latest release of the Python 2.7 series, 2.7.8, has been released and is available for download. 2.7.8 contains several important regression fixes and security changes: - The openssl version bundled in the Windows installer has be

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Mark Lawrence
On 02/07/2014 00:18, Ben Finney wrote: Skip Montanaro writes: I've tried to find people to take it over, but so far unsuccessfully. The principle (laid out by ESR in “The Cathedral and the Bazaar”) is: When you lose interest in a program, your last duty to it is to hand it off to

Re: Success with subprocess communicate on Windows?

2014-07-01 Thread Tim Roberts
Terry Reedy wrote: > >It does not work on Windows. As I reported on >http://bugs.python.org/issue8631, msg222053, > >>> subprocess.check_output("pyflakes -h") >works in the interpreter and Idle shell, while > >>> s.check_output("pyflakes c:\programs\python34\lib\turtle.py") >gives bizarre output

Re: What use with Python

2014-07-01 Thread david.gar...@gmail.com
How about Web python? https://wiki.python.org/moin/WebFrameworks PC can run linux. Perhaps a vagrant linux virtual host would be in order? http://www.vagrantup.com/ Or windoz https://www.python.org/download/windows David On Tue, Jul 1, 2014 at 3:56 PM, wrote: > Hi, > > I am new to Python. Week

Re: What use with Python

2014-07-01 Thread William Ray Wing
On Jul 1, 2014, at 6:56 PM, rxjw...@gmail.com wrote: > Hi, > > I am new to Python. Weeks ago, I was asked about Python questions on an > interview. > Now I want to learn Python, but I do not know what I can do with it on a PC. > Especially I would like to do something interesting instead of som

Re: general module auditing

2014-07-01 Thread Rita
yes, this helps. But I want to know who uses the module, serpent. So, when I upgrade it or remove it they won't be affected adversely. On Tue, Jul 1, 2014 at 2:16 PM, Irmen de Jong wrote: > On 1-7-2014 12:38, Rita wrote: > > i work in a group of developers (15 or so) who are located globally.

Re: fixing an horrific formatted csv file.

2014-07-01 Thread Chris Angelico
On Wed, Jul 2, 2014 at 7:41 AM, flebber wrote: > I understand why providing full solutions is frowned upon, because it doesn't > assist in learning. Which is true, it's incredibly helpful in this case. In this case, my main reason for not providing a full solution is that the work tends to be i

Discussion problems of monoculture (was: What's the "right" way to abandon an open source package?)

2014-07-01 Thread Ben Finney
Ian Kelly writes: > On Tue, Jul 1, 2014 at 1:05 PM, Paul Sokolovsky wrote: > > On 01 Jul 2014 18:40:23 GMT > > Steven D'Aprano wrote: > >> http://nedbatchelder.com/blog/201405/github_monoculture.html > > > > Everyone who (re)posts stuff like that should have mandatory N.B. of "I > > just bought

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Ben Finney
Skip Montanaro writes: > I've tried to find people to take it over, but so far unsuccessfully. The principle (laid out by ESR in “The Cathedral and the Bazaar”) is: When you lose interest in a program, your last duty to it is to hand it off to a competent successor. http://www.cat

Re: 1-0.95

2014-07-01 Thread pecore
Pedro Izecksohn writes: > pedro@microboard:~$ /usr/bin/python3 > Python 3.3.2+ (default, Feb 28 2014, 00:52:16) > [GCC 4.8.1] on linux > Type "help", "copyright", "credits" or "license" for more information. 1-0.95 > 0.050044   > >   How to get 0.05 as result? print("%4.2f"

Re: 1-0.95

2014-07-01 Thread Mark Lawrence
On 01/07/2014 22:17, Pedro Izecksohn wrote: pedro@microboard:~$ /usr/bin/python3 Python 3.3.2+ (default, Feb 28 2014, 00:52:16) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. 1-0.95 0.050044 How to get 0.05 as result? bc has sc

What use with Python

2014-07-01 Thread rxjwg98
Hi, I am new to Python. Weeks ago, I was asked about Python questions on an interview. Now I want to learn Python, but I do not know what I can do with it on a PC. Especially I would like to do something interesting instead of some text search etc. Python may can do more than I realize now. Cou

1-0.95

2014-07-01 Thread Pedro Izecksohn
pedro@microboard:~$ /usr/bin/python3 Python 3.3.2+ (default, Feb 28 2014, 00:52:16) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 1-0.95 0.050044 >>>    How to get 0.05 as result?   bc has scale=2 . Has Python some similar feature? -

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Ian Kelly
On Tue, Jul 1, 2014 at 1:05 PM, Paul Sokolovsky wrote: > On 01 Jul 2014 18:40:23 GMT > Steven D'Aprano wrote: >> http://nedbatchelder.com/blog/201405/github_monoculture.html > > Everyone who (re)posts stuff like that should have mandatory N.B. of "I > just bought a server farm to offer an alterna

Re: fixing an horrific formatted csv file.

2014-07-01 Thread flebber
That's a really cool solution. I understand why providing full solutions is frowned upon, because it doesn't assist in learning. Which is true, it's incredibly helpful in this case. The python cookbook is really good and what I was using as a start for dealing with csv. But it doesn't even go

Success with subprocess communicate on Windows?

2014-07-01 Thread Terry Reedy
I am mentoring a GSOC student, Saimadhav Heblikar, who is working on adding the following feature to Idle: submit the editor text to an external program, such as pyflakes, and display the result in an OutputWindow. If it reports line numbers with problems, as pyflakes does, users will be able t

Re: fixing an horrific formatted csv file.

2014-07-01 Thread F.R.
On 07/01/2014 04:04 PM, flebber wrote: What I am trying to do is to reformat a csv file into something more usable. currently the file has no headers, multiple lines with varying columns that are not related. This is a sample Meeting,05/07/14,RHIL,Rosehill Gardens,Weights,TAB,+3m Entire Circui

Re: Get named groups from a regular expression

2014-07-01 Thread jkn
On Tuesday, 1 July 2014 16:12:34 UTC+1, Florian Lindner wrote: > Hello, > > > > Is there a way I can extract the named groups from a regular expression? > > e.g. given "(?P\d)" I want to get something like ["testgrp"]. > > > > OR > > > > Can I make the match object to return default val

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Paul Sokolovsky
Hello, On 01 Jul 2014 18:40:23 GMT Steven D'Aprano wrote: > On Tue, 01 Jul 2014 20:59:48 +0300, Paul Sokolovsky wrote: > > > Put it on github > > > http://nedbatchelder.com/blog/201405/github_monoculture.html Everyone who (re)posts stuff like that should have mandatory N.B. of "I just bought

Re: Get named groups from a regular expression

2014-07-01 Thread Peter Otten
Chris Angelico wrote: > On Wed, Jul 2, 2014 at 1:29 AM, Peter Otten <__pete...@web.de> wrote: >> Easy, just write a regular expression to parse regular expressions ;) > > Hmm, is that even possible? AIUI you can't make a regex that correctly > parses nested tokens, and named groups can definitely

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Skip Montanaro
It's on github (by request from another person who didn't take it over). It's also on Google Code. I'm actually pretty naive and agnostic about these various hosting sites and their favorite revision control tools, but I don't have enough time to master all of them. I think I have a couple volunte

Re: Python While loop Takes too much time.

2014-07-01 Thread Denis McMahon
On Tue, 01 Jul 2014 14:40:18 +0200, Peter Otten wrote: > What I'm trying to tell you: you need to put in some work to identify > the culprit... His next question was "how do I read a range from excel, please give me an example" I gave him an example of using google to search for solutions to hi

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Steven D'Aprano
On Tue, 01 Jul 2014 20:59:48 +0300, Paul Sokolovsky wrote: > Put it on github http://nedbatchelder.com/blog/201405/github_monoculture.html Besides, do you really want to give your support to a crowd who built a replica of the Oval Office in their corporate offices? While git is a decent DVCS,

Re: general module auditing

2014-07-01 Thread Irmen de Jong
On 1-7-2014 12:38, Rita wrote: > i work in a group of developers (15 or so) who are located globally. I > would like to know what modules everyone is uses if I ever have to upgrade > my python. Is there mechanism which will let me see who is using what? > > ie, > > tom,matplotlib > bob, pylab >

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Ethan Furman
On 07/01/2014 10:30 AM, Skip Montanaro wrote: This is only Python-related because the package in question (lockfile at PyPI) is written in Python and hosted (at least in part) on PyPI. I have not had any interest in maintaining this package for a few years. I wrote it mostly as an exercise, and w

Re: What's the "right" way to abandon an open source package?

2014-07-01 Thread Paul Sokolovsky
Hello, On Tue, 1 Jul 2014 12:30:44 -0500 Skip Montanaro wrote: > This is only Python-related because the package in question (lockfile > at PyPI) is written in Python and hosted (at least in part) on PyPI. I > have not had any interest in maintaining this package for a few years. > I wrote it mo

Re: thread.interrupt_main() behaviour

2014-07-01 Thread Ian Kelly
On Tue, Jul 1, 2014 at 3:45 AM, Skip Montanaro wrote: > On Tue, Jul 1, 2014 at 3:58 AM, Piyush Verma <114piy...@gmail.com> wrote: >> >> Since two threads are running same method, I wanted to know which main >> thread will be interrupted in both case. > > I'm no threading expert, but a process can

What's the "right" way to abandon an open source package?

2014-07-01 Thread Skip Montanaro
This is only Python-related because the package in question (lockfile at PyPI) is written in Python and hosted (at least in part) on PyPI. I have not had any interest in maintaining this package for a few years. I wrote it mostly as an exercise, and while I do happen to use it ever-so-slightly in m

Re: Get named groups from a regular expression

2014-07-01 Thread MRAB
On 2014-07-01 16:12, Florian Lindner wrote: Hello, Is there a way I can extract the named groups from a regular expression? e.g. given "(?P\d)" I want to get something like ["testgrp"]. OR Can I make the match object to return default values for named groups, even if no match was produced? i

Re: Get named groups from a regular expression

2014-07-01 Thread Chris Angelico
On Wed, Jul 2, 2014 at 1:29 AM, Peter Otten <__pete...@web.de> wrote: > Easy, just write a regular expression to parse regular expressions ;) Hmm, is that even possible? AIUI you can't make a regex that correctly parses nested tokens, and named groups can definitely be nested. ChrisA -- https://

Re: Searching for lots of similar strings (filenames) in sqlite3 database

2014-07-01 Thread Chris Angelico
On Wed, Jul 2, 2014 at 1:15 AM, Adam Funk wrote: > On 2014-07-01, Chris Angelico wrote: > >> On Tue, Jul 1, 2014 at 9:26 PM, Adam Funk wrote: >>> cursor.execute('SELECT filename FROM files WHERE filename IS ?', >>> (filename,)) >> >> Shouldn't this be an equality check rather than IS, wh

Re: Get named groups from a regular expression

2014-07-01 Thread Peter Otten
Florian Lindner wrote: > Is there a way I can extract the named groups from a regular expression? > e.g. given "(?P\d)" I want to get something like ["testgrp"]. Easy, just write a regular expression to parse regular expressions ;) (Sorry, I can't contribute something constructive, my first idea

Re: Searching for lots of similar strings (filenames) in sqlite3 database

2014-07-01 Thread Adam Funk
On 2014-07-01, Chris Angelico wrote: > On Tue, Jul 1, 2014 at 9:26 PM, Adam Funk wrote: >> cursor.execute('SELECT filename FROM files WHERE filename IS ?', >> (filename,)) > > Shouldn't this be an equality check rather than IS, which normally I'd > expect to be "IS NULL" or "IS NOT NULL"

Get named groups from a regular expression

2014-07-01 Thread Florian Lindner
Hello, Is there a way I can extract the named groups from a regular expression? e.g. given "(?P\d)" I want to get something like ["testgrp"]. OR Can I make the match object to return default values for named groups, even if no match was produced? Thanks, Florian -- https://mail.python.org/m

Re: fixing an horrific formatted csv file.

2014-07-01 Thread MRAB
On 2014-07-01 15:04, flebber wrote: What I am trying to do is to reformat a csv file into something more usable. currently the file has no headers, multiple lines with varying columns that are not related. This is a sample Meeting,05/07/14,RHIL,Rosehill Gardens,Weights,TAB,+3m Entire Circuit,

Re: Convert Excel Range into python List

2014-07-01 Thread Mark Lawrence
On 01/07/2014 11:51, Jaydeep Patil wrote: How to convert excel range into python list or tuple? show me example Regards Jaydeep Patil Sorry but if you can't show that you've put some effort into this then you're not likely to get answers. Further would you please use the mailing list http

fixing an horrific formatted csv file.

2014-07-01 Thread flebber
What I am trying to do is to reformat a csv file into something more usable. currently the file has no headers, multiple lines with varying columns that are not related. This is a sample Meeting,05/07/14,RHIL,Rosehill Gardens,Weights,TAB,+3m Entire Circuit, , Race,1,CIVIC STAKES,CIVIC,

Re: Searching for lots of similar strings (filenames) in sqlite3 database

2014-07-01 Thread Chris Angelico
On Tue, Jul 1, 2014 at 10:13 PM, MRAB wrote: > Anyway, I'm sure there's something in SQL for "insert or update" or "on > duplicate", but that's an SQL question, not a Python question. Not in standard SQL, no; there might be in SQLite, as a non-standard extension, but it's a fundamentally hard pro

Re: unorderable error: less ok, equal ok, less-or-equal gives unorderable error!

2014-07-01 Thread Peter Otten
Ethan Furman wrote: > On 06/30/2014 12:34 PM, Peter Otten wrote: >> RainyDay wrote: >>> >>> def __eq__(self, other): >>> return self._loc == getattr(other, "_loc", None) >> >> Note that None is not a good default when _loc is expected to be a tuple: > > In this case None is not bein

Re: Python While loop Takes too much time.

2014-07-01 Thread Peter Otten
Jaydeep Patil wrote: > Dear Peter, > I have tested code written by you. But still it is taking same time. Too bad ;( If you run the equivalent loop written in Basic from within Excel -- is that faster? If you run the loop in Python with some made-up data instead of that fetched from Excel --

Re: Searching for lots of similar strings (filenames) in sqlite3 database

2014-07-01 Thread MRAB
On 2014-07-01 12:26, Adam Funk wrote: I have some code that reads files in a leafnode2 news spool & needs to check for new files periodically. The full paths are all like '/var/spool/news/message.id/345/<123...@example.com>' with a 3-digit subdirectory & a Message-ID for the filename itself. I'

[ANN] Oktest.py 0.15.0 released; a new-style testing library

2014-07-01 Thread Makoto Kuwata
Hi all, I released Oktest.py 0.15.0. * PyPI: https://pypi.python.org/pypi/Oktest/ * Document: http://www.kuwata-lab.com/oktest/oktest-py_users-guide.html What is Oktest.py? -- Oktest.py is a new-style testing library for Python. Example:: from oktest import test, ok, NG

Re: Searching for lots of similar strings (filenames) in sqlite3 database

2014-07-01 Thread Chris Angelico
On Tue, Jul 1, 2014 at 9:26 PM, Adam Funk wrote: > cursor.execute('SELECT filename FROM files WHERE filename IS ?', > (filename,)) Shouldn't this be an equality check rather than IS, which normally I'd expect to be "IS NULL" or "IS NOT NULL"? As to your actual question: Your two databas

Re: Python While loop Takes too much time.

2014-07-01 Thread Jaydeep Patil
On Monday, 30 June 2014 18:16:21 UTC+5:30, Peter Otten wrote: > Jaydeep Patil wrote: > > > > > I have did excel automation using python. > > > In my code I am creating python dictionaries for different three columns > > > data at a time.There are are many rows above 4000. Lets have look in be

Searching for lots of similar strings (filenames) in sqlite3 database

2014-07-01 Thread Adam Funk
I have some code that reads files in a leafnode2 news spool & needs to check for new files periodically. The full paths are all like '/var/spool/news/message.id/345/<123...@example.com>' with a 3-digit subdirectory & a Message-ID for the filename itself. I'm using Python 3 & sqlite3 in the standa

Re: Convert Excel Range into python List

2014-07-01 Thread Denis McMahon
On Tue, 01 Jul 2014 03:51:31 -0700, Jaydeep Patil wrote: > How to convert excel range into python list or tuple? > show me example http://lmgtfy.com/?q=convert+excel+range+into+python+list+or+tuple This is an example of how to google a programming question. Learn from it! -- Denis McMahon, den

Convert Excel Range into python List

2014-07-01 Thread Jaydeep Patil
How to convert excel range into python list or tuple? show me example Regards Jaydeep Patil -- https://mail.python.org/mailman/listinfo/python-list

general module auditing

2014-07-01 Thread Rita
i work in a group of developers (15 or so) who are located globally. I would like to know what modules everyone is uses if I ever have to upgrade my python. Is there mechanism which will let me see who is using what? ie, tom,matplotlib bob, pylab nancy, numpy nancy, matplotlib etc... -- ---

How to add ftp put function in PyQT network ftp demo

2014-07-01 Thread 不坏阿峰
I want to modify the pyqt network ftp demo to include an upload function, but I am failing. Could someone can show me how to do this? I have tried to add this code, but it does not work. [Orignal demo]https://github.com/Werkov/PyQt4/blob/master/examples/network/ftp/ftp.py at First, i add these

Re: Python and wireshark.

2014-07-01 Thread Adnan Sadzak
You can try scapy (http://www.secdev.org/projects/scapy/) Cheers, Adnan On Tue, Jul 1, 2014 at 11:56 AM, Sean Murphy wrote: > All. > > Is there any way to use python with Wireshark/Tshark? I am not able to use > the GUI due to my vision impairment. So I am thinking of using Wireshark > libra

Python and wireshark.

2014-07-01 Thread Sean Murphy
All. Is there any way to use python with Wireshark/Tshark? I am not able to use the GUI due to my vision impairment. So I am thinking of using Wireshark libraries and Python to provide a text console environment. Tshark does give you command line capability. I am more seeking for the ability of

Re: thread.interrupt_main() behaviour

2014-07-01 Thread Skip Montanaro
On Tue, Jul 1, 2014 at 3:58 AM, Piyush Verma <114piy...@gmail.com> wrote: > > Since two threads are running same method, I wanted to know which main thread > will be interrupted in both case. I'm no threading expert, but a process can only have one main thread, the one you labeled "P". Threads T2

thread.interrupt_main() behaviour

2014-07-01 Thread Piyush Verma
Hi, What is the behavior when we call thread.interrupt_main() method. Using this method I have implemented a new method for checking timeout. 359def TimeoutFunc(self):360 '''Function invoked by timer thread in case of timeout '''361 self.log.debug("Timeout thread invoked now for