MailingLogger 3.4.0 Released!

2011-08-18 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger. Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the following

Re: pairwise combination of two lists

2011-08-18 Thread Paul Rubin
Yingjie Lin yingjie@mssm.edu writes: li1 = ['a', 'b'] li2 = ['1', '2'] and I wish to obtain a list like this li3 = ['a1', 'a2', 'b1', 'b2'] from itertools import * li3 = list(chain.from_iterable(izip(li1,li2))) -- http://mail.python.org/mailman/listinfo/python-list

Re: pairwise combination of two lists

2011-08-18 Thread Alain Ketterlin
Yingjie Lin yingjie@mssm.edu writes: I have two lists: li1 = ['a', 'b'] li2 = ['1', '2'] and I wish to obtain a list like this li3 = ['a1', 'a2', 'b1', 'b2'] Is there a handy and efficient function to do this, especially when li1 and li2 are long lists. It's not difficult to

Re: Wait for a keypress before continuing?

2011-08-18 Thread peter
On Aug 17, 3:16 pm, Hans Mulder han...@xs4all.nl wrote: On 17/08/11 10:03:00, peter wrote: Is there an equivalent to msvcrt for Linux users?  I haven't found one, and have resorted to some very clumsy code which turns off keyboard excho then reads stdin. Seems such an obvious thing to want

Re: Syntactic sugar for assignment statements: one value to multiple targets?

2011-08-18 Thread John Pinner
On Aug 3, 2:45 am, gc gc1...@gmail.com wrote: Hi everyone! Longtime lurker, hardly an expert, but I've been using Python for various projects since 2007 and love it. I'm looking for either (A) suggestions on how to do a very common operation elegantly and Pythonically, or (B) input on whether

decorator issue with modules dbus gobject

2011-08-18 Thread Makiavelik
Hi, Here is a sample code that reproduces the issue : [code] import logging import unittest import signal import gobject import dbus from functools import wraps from dbus.mainloop.glib import DBusGMainLoop class TimeoutException(Exception): pass def timeout(timeout_time=1800):

Re: lists and for loops

2011-08-18 Thread Mark Niemczyk
Or, using list comprehension. numbers = [1, 2, 3, 4, 5] numbers = [n + 5 for n in numbers] numbers [6, 7, 8, 9, 10] -- http://mail.python.org/mailman/listinfo/python-list

Re: lists and for loops

2011-08-18 Thread Tim Chase
On 08/18/2011 07:22 AM, Mark Niemczyk wrote: Or, using list comprehension. numbers = [1, 2, 3, 4, 5] numbers = [n + 5 for n in numbers] numbers [6, 7, 8, 9, 10] Or, if you want it in-place: numbers[:] = [n+5 for n in numbers] which makes a difference if you have another reference to

List spam

2011-08-18 Thread Jason Staudenmayer
I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? Jason ..·º -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntactic sugar for assignment statements: one value to multiple targets?

2011-08-18 Thread Roy Smith
In article 16ea4848-db0c-489a-968c-ca40700f5...@m5g2000prh.googlegroups.com, gc gc1...@gmail.com wrote: I frequently need to initialize several variables to the same value, as I'm sure many do. Sometimes the value is a constant, often zero; sometimes it's more particular, such as

Re: List spam

2011-08-18 Thread Tim Golden
On 18/08/2011 13:58, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? I haven't seen any significant quantity of spam on the list for ages.

Re: List spam

2011-08-18 Thread Philip Semanchuk
On Aug 18, 2011, at 8:58 AM, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? This has been discussed on the list a number of times before,

RE: List spam

2011-08-18 Thread Jason Staudenmayer
On 18/08/2011 13:58, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? I haven't seen any significant quantity of spam on the list for

extend class: include factories functions inside constructor

2011-08-18 Thread aspineux
Hi I have a closed class and 2 factories function class Data: def __init__(self): self.payload=None def data_from_string(payload): data=Data() data.payload=payload return data def data_from_file(f): data=Data() data.payload=f.read() return data And I want to extend the class,

RE: List spam

2011-08-18 Thread Jason Staudenmayer
On Aug 18, 2011, at 8:58 AM, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? This has been discussed on the list a number of times

Re: List spam

2011-08-18 Thread gene heskett
On Thursday, August 18, 2011 09:51:04 AM Philip Semanchuk did opine: On Aug 18, 2011, at 8:58 AM, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to

Re: List spam

2011-08-18 Thread Ghodmode
On Thu, Aug 18, 2011 at 9:30 PM, Tim Golden m...@timgolden.me.uk wrote: On 18/08/2011 13:58, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list?

Re: [Python] Re: Windows service in production?

2011-08-18 Thread Chris Gonnerman
Chiming in late here, but I've been running a very simple Python service for some time now on a number of computers. It's my Raw Print Server, available at http://newcenturycomputers.net/projects/rawprintserver.html, and I have instructions on the page for installing the Windows service

Re: List spam

2011-08-18 Thread Ghodmode
On Thu, Aug 18, 2011 at 9:39 PM, Philip Semanchuk phi...@semanchuk.com wrote: On Aug 18, 2011, at 8:58 AM, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it

Re: List spam

2011-08-18 Thread rantingrick
On Aug 18, 8:39 am, Jason Staudenmayer jas...@adventureaquarium.com wrote: [snip irony] Adventure Aquarium is America's Most Touchable Aquarium! Featuring the ALL NEW Stingray Beach Club Where you can touch and hand feed the gentle stingrays To buy and print your tickets at home visit  

Re: extend class: include factories functions inside constructor

2011-08-18 Thread Peter Otten
aspineux wrote: Hi I have a closed class and 2 factories function class Data: def __init__(self): self.payload=None def data_from_string(payload): data=Data() data.payload=payload return data def data_from_file(f): data=Data() data.payload=f.read() return data

Re: List spam

2011-08-18 Thread Alain Ketterlin
Jason Staudenmayer jas...@adventureaquarium.com writes: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? I'm using nntp to read this newsgroup (through an academic

How to convert a list of strings into a list of variables

2011-08-18 Thread noydb
How would you convert a list of strings into a list of variables using the same name of the strings? So, [red, one, maple] into [red, one, maple] Thanks for any help! -- http://mail.python.org/mailman/listinfo/python-list

Re: extend class: include factories functions inside constructor

2011-08-18 Thread aspineux
On Aug 18, 4:45 pm, Peter Otten __pete...@web.de wrote: aspineux wrote: Hi I have a closed class and 2 factories function class Data:   def __init__(self):     self.payload=None def data_from_string(payload):   data=Data()   data.payload=payload   return data def

Re: List spam

2011-08-18 Thread Alain Ketterlin
Ghodmode ghodm...@ghodmode.com writes: [...] Make an effort to curb the spam even if it means killing the newsgroup availability. Choose mailman or Google Groups, or another single solution. Make it members only, but allow anyone to register with an automated confirmation email and a

Re: pairwise combination of two lists

2011-08-18 Thread Ian Kelly
On Wed, Aug 17, 2011 at 4:22 PM, Yingjie Lin yingjie@mssm.edu wrote: Hi Python users, I have two lists: li1 = ['a', 'b'] li2 = ['1', '2'] and I wish to obtain a list like this li3 = ['a1', 'a2', 'b1', 'b2'] Is there a handy and efficient function to do this, especially when li1 and

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread David Robinow
On Thu, Aug 18, 2011 at 10:57 AM, noydb jenn.du...@gmail.com wrote: How would you convert a list of strings into a list of variables using the same name of the strings? So, [red, one, maple] into [red, one, maple] Why would you want to? -- http://mail.python.org/mailman/listinfo/python-list

Measure the amount of memory used?

2011-08-18 Thread Jack Bates
I wrote a content filter for Postfix with Python, https://github.com/jablko/cookie It should get started once, and hopefully run for a long time - so I'm interested in how it uses memory: 1) How does the amount of memory used change as it runs? 2) How does the amount of memory used change as

Re: extend class: include factories functions inside constructor

2011-08-18 Thread aspineux
On Aug 18, 4:45 pm, Peter Otten __pete...@web.de wrote: aspineux wrote: Hi I have a closed class and 2 factories function class Data:   def __init__(self):     self.payload=None def data_from_string(payload):   data=Data()   data.payload=payload   return data def

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread noydb
On Aug 18, 11:12 am, David Robinow drobi...@gmail.com wrote: On Thu, Aug 18, 2011 at 10:57 AM, noydb jenn.du...@gmail.com wrote: How would you convert a list of strings into a list of variables using the same name of the strings? So, [red, one, maple] into [red, one, maple]   Why would

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread Jerry Hill
On Thu, Aug 18, 2011 at 11:19 AM, noydb jenn.du...@gmail.com wrote: I am being passed the list of strings.  I have variables set up already pointing to files.  I need to loop through each variable in the list and do things to the files.  The list of strings will change each time, include up to

Re: Measure the amount of memory used?

2011-08-18 Thread John Gordon
In mailman.166.1313680196.27778.python-l...@python.org Jack Bates ms...@freezone.co.uk writes: 1) How does the amount of memory used change as it runs? I've observed that the amount of memory consumed by a program will stay constant or increase; it never decreases. Or were you wanting to

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread noydb
On Aug 18, 11:29 am, Jerry Hill malaclyp...@gmail.com wrote: On Thu, Aug 18, 2011 at 11:19 AM, noydb jenn.du...@gmail.com wrote: I am being passed the list of strings.  I have variables set up already pointing to files.  I need to loop through each variable in the list and do things to the

Re: List spam

2011-08-18 Thread D'Arcy J.M. Cain
On Thu, 18 Aug 2011 22:37:37 +0800 Ghodmode ghodm...@ghodmode.com wrote: Make an effort to curb the spam even if it means killing the newsgroup availability. Choose mailman or Google Groups, or another single solution. Make it members only, but allow anyone to register with an automated

Sqlalchemy + Cherrypy

2011-08-18 Thread Navkirat Singh
Hi Guys, I am not sure if this is the right place to put this question. I am trying to figure out what the proper/clean way is to integrate cherrypy and sqlalchemy? I am currently trying to do this cherrypy 3 and sqlalchemy .7 in python 3.2 a) Cherrypy tools b) Integrate it directly into the app

RE: List spam

2011-08-18 Thread Jason Staudenmayer
On Aug 18, 8:39 am, Jason Staudenmayer jas...@adventureaquarium.com wrote: [snip irony] Adventure Aquarium is America's Most Touchable Aquarium! Featuring the ALL NEW Stingray Beach Club Where you can touch and hand feed the gentle stingrays To buy and print your tickets at home

Re: List spam

2011-08-18 Thread gene heskett
On Thursday, August 18, 2011 12:08:00 PM Ghodmode did opine: On Thu, Aug 18, 2011 at 9:39 PM, Philip Semanchuk phi...@semanchuk.com wrote: On Aug 18, 2011, at 8:58 AM, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread John Gordon
In 2ab25f69-6017-42a6-a7ef-c71bc2ee8...@l2g2000vbn.googlegroups.com noydb jenn.du...@gmail.com writes: How would you convert a list of strings into a list of variables using the same name of the strings? So, [red, one, maple] into [red, one, maple] Thanks for any help! If the strings and

Re: List spam

2011-08-18 Thread Ghodmode
On Thu, Aug 18, 2011 at 10:58 PM, Alain Ketterlin al...@dpt-info.u-strasbg.fr wrote: Ghodmode ghodm...@ghodmode.com writes: [...] Make an effort to curb the spam even if it means killing the newsgroup availability.  Choose mailman or Google Groups, or another single solution.  Make it

Re: List spam

2011-08-18 Thread gene heskett
On Thursday, August 18, 2011 12:08:38 PM Alain Ketterlin did opine: Jason Staudenmayer jas...@adventureaquarium.com writes: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to

Re: List spam

2011-08-18 Thread gene heskett
On Thursday, August 18, 2011 12:14:39 PM Alain Ketterlin did opine: Ghodmode ghodm...@ghodmode.com writes: [...] Make an effort to curb the spam even if it means killing the newsgroup availability. Choose mailman or Google Groups, or another single solution. Make it members only,

Re: List spam

2011-08-18 Thread Ned Deily
In article cak--mtqoq0scvofzfzfcd7jf9n1yjcpqyjcrdxgtxxpdoyc...@mail.gmail.com, Ghodmode ghodm...@ghodmode.com wrote: Newsgroups aren't inherently spam-free. They're filtered. At least that's the case with Gmane (http://gmane.org/spam.php). My own ISP doesn't provide a news server and,

Word Perfect integration

2011-08-18 Thread Ethan Furman
I have WordPerfect v13 which we are currently using for letter merges. I would like to automate this with Python instead of learning the WP Macro language. Does anyone have any pointers? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: lists and for loops

2011-08-18 Thread Peter Pearson
On Wed, 17 Aug 2011 20:08:23 -0700 (PDT), Emily Anne Moravec wrote: I want to add 5 to each element of a list by using a for loop. Why doesn't this work? numbers = [1, 2, 3, 4, 5] for n in numbers: n = n + 5 print numbers Because integers are immutable. You cannot turn 1 into 6.

Re: Word Perfect integration

2011-08-18 Thread John Gordon
In mailman.177.1313685870.27778.python-l...@python.org Ethan Furman et...@stoneleaf.us writes: I have WordPerfect v13 which we are currently using for letter merges. I would like to automate this with Python instead of learning the WP Macro language. I suspect that learning how to

Re: List spam

2011-08-18 Thread Alain Ketterlin
gene heskett ghesk...@wdtv.com writes: Or save work and find a public nntp server (or setup one, or ask your provider), and use a news reader to follow the list (even thunderbird can do this). No spam, no need to store messages on your machine, auto-purge after a configurable delay, etc.

Re: List spam

2011-08-18 Thread Peter Pearson
On Thu, 18 Aug 2011 16:58:04 +0200, Alain Ketterlin wrote: Ghodmode ghodm...@ghodmode.com writes: [...] Make an effort to curb the spam even if it means killing the newsgroup availability. Choose mailman or Google Groups, or another single solution. Make it members only, but allow anyone

Re: List spam

2011-08-18 Thread Peter Pearson
On Thu, 18 Aug 2011 12:15:59 -0400, gene heskett ghesk...@wdtv.com wrote: [snip] What is wrong with the mailing list only approach? In the mailing-list approach, how do I search for prior discussions on a subject? (I'm not particularly opposed to the mailing list, I'm just an NNTP follower

Re: List spam

2011-08-18 Thread Philip Semanchuk
On Aug 18, 2011, at 1:10 PM, Peter Pearson wrote: On Thu, 18 Aug 2011 12:15:59 -0400, gene heskett ghesk...@wdtv.com wrote: [snip] What is wrong with the mailing list only approach? In the mailing-list approach, how do I search for prior discussions on a subject? (I'm not particularly

Re: List spam

2011-08-18 Thread Ghodmode
On Fri, Aug 19, 2011 at 12:37 AM, Ned Deily n...@acm.org wrote: 4. gmane (various formats)   http://dir.gmane.org/gmane.comp.python.general   a.  gmane.comp.python.general (non-Usenet group via NNTP) All of the above allow both reading and posting.  gmane does spam filtering so, if you read

Re: List spam

2011-08-18 Thread Chris Angelico
On Thu, Aug 18, 2011 at 3:37 PM, Ghodmode ghodm...@ghodmode.com wrote: Make an effort to curb the spam even if it means killing the newsgroup availability.  Choose mailman or Google Groups, or another single solution.  Make it members only, but allow anyone to register with an automated

Re: Measure the amount of memory used?

2011-08-18 Thread Dan Stromberg
A person with one watch knows what time it is. A person with two is never sure. You're probably best off just picking one or more measures that work for your purposes, and going with them. Don't concern yourself overmuch with finding the amount. Memory can actually contract on some modern

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread Chris Angelico
On Thu, Aug 18, 2011 at 5:09 PM, John Gordon gor...@panix.com wrote: for x in list_of_strings:    list_of_variables.append(eval(x)) If this really is what you need, you can simplify it by using the globals() dictionary - it's a regular dictionary whose contents are all the global variables in

Re: List spam

2011-08-18 Thread Alec Taylor
5963 unread emails. Thanks python-list + other mailing-lists! My recommendation to you is to setup a different account for your mailing-lists. Alternatively setup some mail rules. On Fri, Aug 19, 2011 at 3:46 AM, Chris Angelico ros...@gmail.com wrote: On Thu, Aug 18, 2011 at 3:37 PM, Ghodmode

Re: Word Perfect integration

2011-08-18 Thread Alec Taylor
wow, people still use WordPerfect? On Fri, Aug 19, 2011 at 2:51 AM, John Gordon gor...@panix.com wrote: In mailman.177.1313685870.27778.python-l...@python.org Ethan Furman et...@stoneleaf.us writes: I have WordPerfect v13 which we are currently using for letter merges. I would like to

Re: Wait for a keypress before continuing?

2011-08-18 Thread Nobody
On Thu, 18 Aug 2011 01:24:30 -0700, peter wrote: This is very similar to my solution, which was to use stty turn off keyboard echo, then repeatedly read sys.stdin.read(1) until a unique keystroke had been defined. For example, the 'Insert' key seems to return a sequence of four codes, namely

Re: List spam

2011-08-18 Thread Anssi Saari
Ghodmode ghodm...@ghodmode.com writes: Newsgroups aren't inherently spam-free. They're filtered. At least that's the case with Gmane (http://gmane.org/spam.php). My own ISP doesn't provide a news server and, although there are many links for free open news servers, most of them don't seem

Re: List spam

2011-08-18 Thread gene heskett
On Thursday, August 18, 2011 02:12:58 PM Alain Ketterlin did opine: gene heskett ghesk...@wdtv.com writes: Or save work and find a public nntp server (or setup one, or ask your provider), and use a news reader to follow the list (even thunderbird can do this). No spam, no need to store

Re: List spam

2011-08-18 Thread gene heskett
On Thursday, August 18, 2011 02:26:24 PM Peter Pearson did opine: On Thu, 18 Aug 2011 12:15:59 -0400, gene heskett ghesk...@wdtv.com wrote: [snip] What is wrong with the mailing list only approach? In the mailing-list approach, how do I search for prior discussions on a subject? (I'm

Re: List spam

2011-08-18 Thread Dan Stromberg
On Thu, Aug 18, 2011 at 6:39 AM, Jason Staudenmayer jas...@adventureaquarium.com wrote: On 18/08/2011 13:58, Jason Staudenmayer wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned

Re: List spam

2011-08-18 Thread Nobody
On Thu, 18 Aug 2011 14:30:37 +0100, Tim Golden wrote: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? I haven't seen any significant quantity of spam on the list for

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread Nobody
On Thu, 18 Aug 2011 16:09:43 +, John Gordon wrote: How would you convert a list of strings into a list of variables using the same name of the strings? So, [red, one, maple] into [red, one, maple] If the strings and the object names are exactly the same, you could use eval(). Eval

Re: Word Perfect integration

2011-08-18 Thread Ethan Furman
Alec Taylor wrote: wow, people still use WordPerfect? Them's fightin' words right there! :) Yes, we still use Word Perfect, and will as long as it is available. The ability to see the codes in use (bold, margins, columns, etc) has so far been unequaled in anything else I have looked at.

Re: Word Perfect integration

2011-08-18 Thread Ethan Furman
John Gordon wrote: I suspect that learning how to integrate python with wordperfect will end up being much more work than learning wordperfect macros. Possibly... but I enjoy coding in Python. :) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Help with regular expression in python

2011-08-18 Thread Matt Funk
Hi, i am sorry if this doesn't quite match the subject of the list. If someone takes offense please point me to where this question should go. Anyway, i have a problem using regular expressions. I would like to match the line: 1.002000e+01 2.037000e+01 2.128000e+01 1.908000e+01 1.871000e+01

Re: List spam

2011-08-18 Thread Terry Reedy
I did check, though. I found a free, open news server with comp.lang.python after 6 that didn't work. Unfortunately, the one I found is read-only. I'll have to do some more looking if I want to participate in the newsgroup. I set it up in Thunderbird. I read and post to this and other

Re: Help with regular expression in python

2011-08-18 Thread Martin Komoň
You don't seem to account for the whitespace between the floats. Try '([-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?\s+){32}' (just added \s+). Martin On 8/18/2011 9:49 PM, Matt Funk wrote: Hi, i am sorry if this doesn't quite match the subject of the list. If someone takes offense please point

Re: Help with regular expression in python

2011-08-18 Thread John Gordon
In mailman.191.1313697016.27778.python-l...@python.org Matt Funk matze...@gmail.com writes: 1.002000e+01 2.037000e+01 2.128000e+01 1.908000e+01 1.871000e+01 1.914000e+01 instance_linetype_pattern_str = '([-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?) {32}' instance_linetype_pattern =

Re: List spam

2011-08-18 Thread Terry Reedy
On 8/18/2011 12:14 PM, gene heskett wrote: into a REAL mailing list. Subscribers only, or get past a GOOD captcha. I just had an idea. Ask 'What is python? __ or What can you do with a python?' with a free-form fill in the blank answer. Look for 'computer', 'program' or

Re: Word Perfect integration

2011-08-18 Thread Terry Reedy
On 8/18/2011 3:24 PM, Ethan Furman wrote: Alec Taylor wrote: wow, people still use WordPerfect? Them's fightin' words right there! :) Yes, we still use Word Perfect, and will as long as it is available. The ability to see the codes in use (bold, margins, columns, etc) has so far been

Re: How to print non-printable chars??

2011-08-18 Thread coldpizza
On Aug 13, 7:59 am, Julio Cesar Rodriguez Cruz juliocesarrodriguezc...@gmail.com wrote: Hi all, If I open an .exe file in any text editor I get lot of odd chars, what I want is to know how to output those chars if I have the hexadecimal code. I found out how to do the reverse process with the

Re: How to build python using visual studio 2005?

2011-08-18 Thread Brian Curtin
On Wed, Aug 17, 2011 at 13:16, smith jack thinke...@gmail.com wrote: anybody here have build it correctly? how to make a msi file just as the official site did? is there any detailed tutorial online? We're currently shipping CPython built on VS 2008, but I do know of people building with

Re: List spam

2011-08-18 Thread gene heskett
On Thursday, August 18, 2011 05:18:42 PM Terry Reedy did opine: On 8/18/2011 12:14 PM, gene heskett wrote: into a REAL mailing list. Subscribers only, or get past a GOOD captcha. I just had an idea. Ask 'What is python? __ or What can you do with a python?' with a

Re: Help with regular expression in python

2011-08-18 Thread Vlastimil Brom
2011/8/18 Matt Funk matze...@gmail.com: Hi, i am sorry if this doesn't quite match the subject of the list. If someone takes offense please point me to where this question should go. Anyway, i have a problem using regular expressions. I would like to match the line: 1.002000e+01 2.037000e+01

Re: pairwise combination of two lists

2011-08-18 Thread SigmundV
On Aug 17, 9:22 pm, Yingjie Lin yingjie@mssm.edu wrote: I found zip() but it only gives [('a', '1'), ('b', '2')],  not exactly what I am looking for. Yet, if you feed the zip into a list comprehension you get what you want: li3 = [''.join(l) for l in zip(li1,li2)] Sigmund --

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread AB
Hi, If the «variables» are named attributes you can use getattr. # class colors: red=1 green=2 blue=3 c=colors() a=['red','green','blue'] for v in a: print v,getattr(c,v) #--- AB --

RE: List spam

2011-08-18 Thread Prasad, Ramit
Or 'Enter a Python keyword (search the tutorial if you do not know any) ' Sounds good, but now you've trained the spammer who is without a doubt watching this list. Teach them Python before they can post, I like it! Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies

Re: List spam

2011-08-18 Thread Ben Finney
gene heskett ghesk...@wdtv.com writes: Short answer is to disconnect the the NNTP link and make this list into a REAL mailing list. Subscribers only, or get past a GOOD captcha. Many of the more valuable contributors post via NNTP, which does not require mailing list subscription nor CAPTCHA.

Re: Help with regular expression in python

2011-08-18 Thread Matt Funk
Hi guys, thanks for the suggestions. I had tried the white space before as well (to no avail). So here is the expression i am using (based on suggestions), but still no success: instance_linetype_pattern_str =\ r'(([-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+))?\s+){32}(.+)'

Re: List spam

2011-08-18 Thread Rhodri James
On Thu, 18 Aug 2011 16:00:40 +0100, Jason Staudenmayer jas...@adventureaquarium.com wrote: I'm a strong opponent of dropping any email with a stupid footer spam. By contrast, an excessively large sig (particularly an excessively large sig without a proper separator) is something that's

Re: List spam

2011-08-18 Thread Seebs
On 2011-08-18, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Or 'Enter a Python keyword (search the tutorial if you do not know any) ' Sounds good, but now you've trained the spammer who is without a doubt watching this list. Teach them Python before they can post, I like it! I don't.

Re: Word Perfect integration

2011-08-18 Thread Rhodri James
On Thu, 18 Aug 2011 20:24:17 +0100, Ethan Furman et...@stoneleaf.us wrote: Alec Taylor wrote: wow, people still use WordPerfect? Them's fightin' words right there! :) Yes, we still use Word Perfect, and will as long as it is available. The ability to see the codes in use (bold,

Re: Word Perfect integration

2011-08-18 Thread Seebs
On 2011-08-18, Ethan Furman et...@stoneleaf.us wrote: Yes, we still use Word Perfect, and will as long as it is available. The ability to see the codes in use (bold, margins, columns, etc) has so far been unequaled in anything else I have looked at. I have used other software that had this

Re: List spam

2011-08-18 Thread Chris Angelico
On Fri, Aug 19, 2011 at 12:03 AM, Seebs usenet-nos...@seebs.net wrote: I don't.  If I want to get started in a language, I might well want to read about it a bit, and maybe ask questions like what is a good book for me to start with? If I have to know the language to do that, well... When I

nose + processes + xunit

2011-08-18 Thread Noon Silk
Has anyone had any trouble with this setup? I am in a situation where, the tests run fine when I don't include --processes=N, however, when I *do* do that, they exit early? The reason I think they exit, is that I'm actually running a different executable, and I load it like so: retcode =

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread Steven D'Aprano
Chris Angelico wrote: On Thu, Aug 18, 2011 at 5:09 PM, John Gordon gor...@panix.com wrote: for x in list_of_strings: list_of_variables.append(eval(x)) If this really is what you need, you can simplify it by using the globals() dictionary - it's a regular dictionary whose contents are all

'super' object has no attribute '__setitem__'

2011-08-18 Thread luvspython
I'm using Python 2.7 and the code below fails at the 'super' statement in the __setitem__ function in the HistoryKeeper class. The error is: 'super' object has no attribute '_setitem__' Can anyone please tell me why and how to fix it? (I've googled endlessly and I don't see the problem.)

Re: 'super' object has no attribute '__setitem__'

2011-08-18 Thread Benjamin Peterson
luvspython srehtvandy at gmail.com writes: def __setitem__(self, item, value): super(HistoryKeeper, self).__setitem__(item, value) object has no __setitem__. Are you looking for __setattr__? class Vehicle(HistoryKeeper): def __init__(self, tag, make, model): args =

Re: 'super' object has no attribute '__setitem__'

2011-08-18 Thread Eric Snow
On Thu, Aug 18, 2011 at 7:44 PM, luvspython srehtva...@gmail.com wrote: I'm using Python 2.7 and the code below fails at the 'super' statement in the __setitem__ function in the HistoryKeeper class.  The error is:   'super' object has no attribute '_setitem__' Can anyone please tell me why

Re: List spam

2011-08-18 Thread Steven D'Aprano
gene heskett wrote: But I'd like to return the question. What's wrong with nntp? The sheer volume of traffic eats 99% of an ISP's bandwidth. I doubt that very much, particularly if the ISP drops the binary newsgroups. My ISP, Internode, has provided nntp for many years. For a while a few

Re: Measure the amount of memory used?

2011-08-18 Thread MrJean1
Take a look it this recipe (for Linux only): http://code.activestate.com/recipes/286222/ /Jean On Aug 18, 8:08 am, Jack Bates ms...@freezone.co.uk wrote: I wrote a content filter for Postfix with Python,https://github.com/jablko/cookie It should get started once, and hopefully run for a

Re: List spam

2011-08-18 Thread Steven D'Aprano
Alain Ketterlin wrote: Jason Staudenmayer jas...@adventureaquarium.com writes: I really like this list as part of my learning tools but the amount of spam that I've been getting from it is CRAZY. Doesn't anything get scanned before it sent to the list? I'm using nntp to read this

Re: Windows service in production?

2011-08-18 Thread Grummble
On 08/16/2011 12:32 AM, snorble wrote: Anyone know of a Python application running as a Windows service in production? I'm planning a network monitoring application that runs as a service and reports back to the central server. Sort of a heartbeat type agent to assist with this server is down,

Check email header for RFC 822 standard and match emails between imap servers.

2011-08-18 Thread Vincent Davis
The sort story, I have been attempting to use the Google Migration assistant to migrate emails from one google account to another, about 80,000 emails. I have two problems. 1. Many emails that fail to transfer because of errors like Invalid RFC 822 Message: Date header quot;Mon Feb 05 22:07:16

Re: Help with regular expression in python

2011-08-18 Thread Josh Benner
On Thu, Aug 18, 2011 at 4:03 PM, Matt Funk matze...@gmail.com wrote: Hi guys, thanks for the suggestions. I had tried the white space before as well (to no avail). So here is the expression i am using (based on suggestions), but still no success: instance_linetype_pattern_str =\

Re: [Python] Re: Windows service in production?

2011-08-18 Thread Chris Gonnerman
Chiming in late here, but I've been running a very simple Python service for some time now on a number of computers. It's my Raw Print Server, available at http://newcenturycomputers.net/projects/rawprintserver.html, and I have instructions on the page for installing the Windows service

Re: List spam

2011-08-18 Thread Terry Reedy
On 8/18/2011 10:10 PM, Steven D'Aprano wrote: Now, an ISP might not have the bandwidth to supply all the needs of their customers, that's a separate issue. But complaining that the problem is specifically because they use bittorrent, as if it would disappear if they changed to HTTP, is bogus.

Re: Windows service in production?

2011-08-18 Thread Stephen Hansen
On 8/15/11 9:32 PM, snorble wrote: Anyone know of a Python application running as a Windows service in production? I'm planning a network monitoring application that runs as a service and reports back to the central server. Sort of a heartbeat type agent to assist with this server is down, go

Re: Windows service in production?

2011-08-18 Thread Adam Jorgensen
Yeah, we run our Python App as a service under Windows. You can look at the open-souce part of our product using http://trac.sjsoft.com/browser If you look into the code you should be able to find some stuff to do with services. Specficially, look in trunk/j5/src/j5/OS/WinService.py On 19

[issue11715] Building Python on multiarch Debian and Ubuntu

2011-08-18 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'm not sure this is 100% fixed. After dist-upgrading the Kubuntu VM on my netbook and updating to the latest Py3k code, I got a lot of test errors, even after a make distclean and ./configure. The errors went away after manually tweaking

  1   2   3   >