SIGALRM problem237 (10/13/2008 4:45:46 PM) comp.lang.python I'm trying to run a command on a remote host, something like: result = os.popen('ssh otherhost mycommand').read() It is possible that the other host is down, in which case the ssh command hangs, so I want ... Paul
handling uncaught exceptions with pdb?527 (9/10/2008 9:50:07 PM) comp.lang.python I think I've asked about this before, but is there a way to set up Python to handle uncaught exceptions with pdb? I know about setting sys.except_hook to something that calls pdb, but this is normally done at ... Paul
feature proposal, debug on exception331 (5/21/2008 12:59:07 AM) comp.lang.python There's an occasional question here about how to get python to launch pdb on encountering an uncaught exception. The answer is to look in some ASPN recipe and do some weird magic. I guess that works, but it's... Paul
compressing short strings?822 (5/20/2008 8:15:03 AM) comp.lang.python I have a lot of short English strings I'd like to compress in order to reduce the size of a database. That is, I'd like a compression function that takes a string like (for example) "George Washington" and ret... Paul
cool rant on linear objects631 (1/27/2008 10:21:51 AM) comp.lang.functional 'Use-Once' Variables and Linear Objects -- Storage Management, Reflection and Multi-Threading Henry G. Baker ACM Sigplan Notices 30, 1 (January 1995), 45-52. http://home.pipeline.com/~hbaker1/Use1Var.html =... Paul
recursion elimination?1033 (9/18/2007 5:19:03 PM) comp.lang.functional Is there a reason compilers don't make greater efforts to eliminate recursion? I don't mean tail recursion elimination, I mean converting non-tail calls into tail recursion or iteration: fac 0 = 1 fac n... Paul
MetaOcaml and multistage programming?232 (8/17/2007 6:45:20 PM) comp.lang.functional Can someone explain in simple terms what multistage programming means? I've looked at some of the blurbs and papers about it but can't make sense of it. I certainly understand the idea of a build script genera... Paul
ElementTree surprise437 (8/16/2007 4:46:29 AM) comp.lang.python I have a doc with a bunch of fields like: stuff other stuff and sometimes I use ElementTree to parse the doc and I use the .text attribute to get "stuff" or "other stuff" in the spam and pengui... Paul
undecidable type vs. annotation?232 (8/11/2007 12:53:10 PM) comp.lang.functional Can someone explain what undecidable type inference means, e.g. in GHC? For all this time I've thought it meant that type assignment in fancier type systems was uncomputable, i.e. the inferencer could run for ... Paul
LRU cache?734 (8/11/2007 12:05:40 PM) comp.lang.python Anyone got a favorite LRU cache implementation? I see a few in google but none look all that good. I just want a dictionary indexed by strings, that remembers the last few thousand entries I put in it. It ac... Paul
Modify dict/set during iteration?529 (10/30/2009 2:02:01 AM) comp.lang.python I used this quickndirty way, any good idea to solve this problem? def miter(iterable): cache = set() while True: try: for x in iterable: if x not in cache: ... metal29a(16)
Pyfora, a place for python3331 (11/1/2009 7:06:50 AM) comp.lang.python Hi everyone, I am proud to announce the release of Pyfora (http://pyfora.org), an online community of Python enthusiasts to supplement comp.lang.python and #python. While the site is small right now, please fe... saketh.bhamidipati(11)
substituting list comprehensions for map()4231 (11/2/2009 7:54:16 AM) comp.lang.python I'd like to do: resultlist = operandlist1 + operandlist2 where for example operandlist1=[1,2,3,4,5] operandlist2=[5,4,3,2,1] and resultlist will become [6,6,6,6,6]. Using map(), I can do: map(lambda op1,o... jbperez(2)
Need help dumping exif data in canon raw files226 (11/5/2009 11:10:51 PM) comp.lang.python So I've looked at all sorts of things, gone through as many different things as I can find, but I fear python just can't do it. I just need to be able to extract the exif info from a canon CR2 file. The inf... nuffnough(20)
Most efficient way to "pre-grow" a list?3032 (11/6/2009 12:12:40 PM) comp.lang.python In Perl one can assign a value to any element of an array, even to ones corresponding to indices greater or equal than the length of the array: my @arr; $arr[999] = 42; perl grows the array as needed to ... no.email5(294)
python simply not scaleable enough for google?1126 (11/11/2009 9:57:28 AM) comp.lang.python http://groups.google.com/group/unladen-swallow/browse_thread/thread/4edbc406f544643e?pli=1 thoughts? rday -- ======================================================================== Robert P. J. Day ... rpjday1(25)
Python & Go4426 (11/12/2009 12:53:22 AM) comp.lang.python I'm just learning about Google's latest: the GO (Go?) language. (e.g. http://golang.org or http://www.youtube.com/watch?v=rKnDgT73v8s). There are some distinctly Pythonoid features to the syntax, such as "imp... no.email5(294)
The ol' [[]] * 500 bug...826 (11/13/2009 9:26:01 PM) comp.lang.python ....just bit me in the "fuzzy posterior". The best I can come up with is the hideous lol = [[] for _ in xrange(500)] Is there something better? What did one do before comprehensions were available? I ... no.email5(294)
A "terminators' club" for clp2126 (11/13/2009 11:29:07 PM) comp.lang.python This is "meta-question" about comp.lang.python. I apologize in advance if it has been already discussed. Also, I don't know enough about the underlying mechanics of comp.lang.python, so this may be *totally... no.email5(294)