Re: need help with re module

2007-06-22 Thread Gabriel Genellina
En Sat, 23 Jun 2007 01:12:17 -0300, samwyse <[EMAIL PROTECTED]> escribió: > Speak for yourself. If I'm writing an HTML syntax checker, I think I'll > skip BeautifulSoup and use something that gives me the results that I > expect, not the results that you expect. Sure! By the way, I'm looking for

urllib interpretation of URL with ".."

2007-06-22 Thread John Nagle
Here's a URL, found in a link, which gives us trouble when we try to follow the link: http://sportsbra.co.uk/../acatalog/shop.html Browsers immediately turn this into http://sportsbra.co.uk/acatalog/shop.html and go from there, but urllib tries to open it explicitly, which resul

Re: newbie question about unicode

2007-06-22 Thread Gabriel Genellina
En Sat, 23 Jun 2007 01:10:19 -0300, Genie T <[EMAIL PROTECTED]> escribió: > can anybody tell me whether these two expressions have the same > meanings? > > s = u'' > s1 = s.encode('utf-8') > > AND > > s1 = unicode(s,'utf-8') No - but consider this (assuming your terminal uses utf-8): py> u1 =

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Robert Uhl
Twisted <[EMAIL PROTECTED]> writes: > > How clunky versus usable an interface to a tool is is for those who > invest some, but not extraordinary amounts of, time into its use to > decide. If it requires years of mastery, it is clunky -- period. This > may be unavoidable if it's something involved i

Re: Collections of non-arbitrary objects ?

2007-06-22 Thread Gabriel Genellina
En Fri, 22 Jun 2007 21:45:02 -0300, walterbyrd <[EMAIL PROTECTED]> escribió: > Maybe it's something that doesn't "need" to be done, but it seems to > me that would give you a certain level of built-in integrity - you > could be sure about what's in the structure. I would not expect that > all of

Re: Collections of non-arbitrary objects ?

2007-06-22 Thread Ben Finney
walterbyrd <[EMAIL PROTECTED]> writes: > Maybe it's something that doesn't "need" to be done, but it seems to > me that would give you a certain level of built-in integrity - you > could be sure about what's in the structure. I would not expect that > all of python would be that rigid, but I thoug

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Robert Uhl
Falcolas <[EMAIL PROTECTED]> writes: > >> It's Mac OS and Windows which are inconsistent. Emacs has been >> around since they were mere glimmers in the eye of Jobs & Gates... > > Inconsistent? I would have to disagree. They changed paradigms - > terminal text based interfaces to GUIs. You wouldn't

high performance/threaded applications in Python - your experiences?

2007-06-22 Thread Jay Loden
All, In studying Python, I have predictably run across quite a bit of talk about the GIL and threading in Python. As my day job, I work with a (mostly Java) application that is heavily threaded. As such our application takes good advantage of multiple processors and we can often scale through

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Tim Roberts
Cor Gest <[EMAIL PROTECTED]> wrote: >Some entity, AKA [EMAIL PROTECTED], >wrote this mindboggling stuff: > >> On Jun 22, 6:32 pm, Cor Gest <[EMAIL PROTECTED]> wrote: >> >> So now we're expected to go on a filesystem fishing expedition instead >> of just hit F1? One small step (backwards) for a ma

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Tim Roberts
Bjorn Borud <[EMAIL PROTECTED]> wrote: > >bah, UNIX is not user hostile; it is just selective about its >friends. Right. My favorite Unix quote is from the same source (Dennis Ritchie): Unix is the answer. You just have to phrase the question very carefully. -- Tim Roberts, [EMAIL

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-22 Thread Steven D'Aprano
On Fri, 22 Jun 2007 19:51:28 -0400, Douglas Alan wrote: > You seem oblivious to the fact that one of the huge benefits of Python > is its elegant and readable syntax. The problem with not having a > "flexible syntax", is that a programming language can't provide > off-the-shelf an elegant syntax

Re: newbie question about unicode

2007-06-22 Thread Carsten Haese
On Sat, 23 Jun 2007 04:10:19 -, Genie T wrote > Hi, > > can anybody tell me whether these two expressions have the same > meanings? > > s = u'' > s1 = s.encode('utf-8') > > AND > > s1 = unicode(s,'utf-8') Considering that one works and the other doesn't, no, they don't have the same meanin

Re: EMBEDDING > Run Python & Run C Function

2007-06-22 Thread Gabriel Genellina
En Fri, 22 Jun 2007 12:09:40 -0300, <[EMAIL PROTECTED]> escribió: > At the moment i can run python-string-code from C (MinGW, WinXP) > > But how can i register a C-function in python-RUNTIME and call this C > function from python - without wrapper dll's or libs??? You can use ctypes: http://www.p

Re: need help with re module

2007-06-22 Thread samwyse
Gabriel Genellina wrote: > En Wed, 20 Jun 2007 17:56:30 -0300, David Wahler <[EMAIL PROTECTED]> > escribió: > >> On 6/20/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> [snip] >> I agree that BeautifulSoup is probably the best tool for the job, but >> this doesn't sound right to me. Since th

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-22 Thread Lenard Lindstrom
Douglas Alan wrote: > "Terry Reedy" <[EMAIL PROTECTED]> writes: > >> "Douglas Alan" <[EMAIL PROTECTED]> wrote in message > >> | > But why is the ability to abstract syntax good? > >> | It allows the community to develop language features in a modular way >> | without having to sully the code ba

newbie question about unicode

2007-06-22 Thread Genie T
Hi, can anybody tell me whether these two expressions have the same meanings? s = u'' s1 = s.encode('utf-8') AND s1 = unicode(s,'utf-8') Thanks :) -- http://mail.python.org/mailman/listinfo/python-list

MI5 Persecution: Stasi 21/4/96 (15702)

2007-06-22 Thread MI5Victim
Subject: Chief Constable Alderson Condemns "Stasi" MI5 Newsgroups:uk.misc,uk.politics,uk.media,uk.legal,soc.culture.british Organization: Toronto Free-Net Summary: Keywords: John Alderson, former Chief Constable of Devon and Cornwall, had the following to say about the expansion of the Security

Re: subprocess.popen question

2007-06-22 Thread Gabriel Genellina
En Fri, 22 Jun 2007 10:08:49 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > I seemed to have it working sorta when I run it and save the results I > am noticing that in spe it spaces correctly but when I save it to a > file I can open it in wordpad there is only one line. when I open

Re: Tailing a log file?

2007-06-22 Thread Paul Rubin
"Evan Klitzke" <[EMAIL PROTECTED]> writes: > I checked the source code for tail and they actually poll the file by > using fstat and sleep to check for changes in the file size. This > didn't seem right so I thought about it more and realized I ought to > be using inotify. So I guess I answered my

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-22 Thread Steven D'Aprano
On Fri, 22 Jun 2007 13:54:35 -0400, Douglas Alan wrote: >> Python already allows me to shoot myself in the foot, if I wish. I'm >> comfortable with that level of freedom. I'm not necessarily comfortable >> with extensions to the language that would allow me the freedom to shoot >> myself in the

Re: Internationalised email subjects

2007-06-22 Thread Gabriel Genellina
En Fri, 22 Jun 2007 06:49:22 -0300, <[EMAIL PROTECTED]> escribió: > I've tried removing the encode('GB2312') line, so the code looks like > this: > > h = Header(subject, 'GB2312') > > However, this line still causes the following error message: > > Traceback (most recent call last): > File "/home/

Re: Error while installing Python2.5.1

2007-06-22 Thread zaperaj
In the Red Hat installation cd, i saw that there are four rpms for gcc. Now what do i need to do? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-22 Thread Steven D'Aprano
On Fri, 22 Jun 2007 13:21:14 -0400, Douglas Alan wrote: > I.e., I could write a new object system for Lisp faster than I could > even begin to fathom the internal of CPython. Not only that, I have > absolutely no desire to spend my valuable free time writing C code. > I'd much rather be hacking i

Re: Adding method to a class on the fly

2007-06-22 Thread Steven D'Aprano
On Fri, 22 Jun 2007 14:44:54 -0700, John Henry wrote: > The above doesn't exactly do I what need. I was looking for a way to > add method to a class at run time. > > What does work, is to define an entire sub-class at run time. Like: > > class DummyParent: > def __init__(self): > r

Weekly Python Patch/Bug Summary

2007-06-22 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 385 open (+21) / 3790 closed (+21) / 4175 total (+42) Bugs: 1029 open (+43) / 6744 closed (+43) / 7773 total (+86) RFE : 262 open ( +4) / 291 closed ( +4) / 553 total ( +8) New / Reopened Patches __ syslog sy

MI5 Persecution: A new Kafka? 3/10/95 (5104)

2007-06-22 Thread MI5Victim
Newsgroups: uk.misc,soc.culture.british,uk.media,uk.politics From: [EMAIL PROTECTED] (Dick Jackson) Subject: Re: What it's like to be watched by the security services Message-ID: <[EMAIL PROTECTED]> Sender: [EMAIL PROTECTED] (Usenet Admin) Nntp-Posting-Host: soldev Organization: Citicorp-TTI at San

Re: The Modernization of Emacs

2007-06-22 Thread David Golden
Twisted wrote: > If I sit down at a windows text editor (or > even kwrite or similar) I can just focus on the job. Faced with emacs > or most other text-mode editors (but not MS-DOS Edit, interestingly) > the editor keeps intruding on my focus. Oops. > "emacs or most other text-mode editors" so

Re: Adding method to a class on the fly

2007-06-22 Thread James Stroud
John Henry wrote: > Hi list, > > I have a need to create class methods on the fly. For example, if I > do: > > class Dummy: > def __init__(self): > exec '''def method_dynamic(self):\n\treturn > self.method_static("it's me")''' > return > > def method_static(self, text):

Re: Adding method to a class on the fly

2007-06-22 Thread James Stroud
7stud wrote: > On Jun 22, 3:23 pm, askel <[EMAIL PROTECTED]> wrote: > >>sorry, of course last line should be: >>Dummy().method2('Hello, world!') > > > ..which doesn't meet the op's requirements. > Which were contradictory. -- http://mail.python.org/mailman/listinfo/python-list

Re: is this a valid import sequence ?

2007-06-22 Thread Steven D'Aprano
On Fri, 22 Jun 2007 21:43:40 +0200, Stef Mientki wrote: > This might be a very weird construction, > but it's the most easy way in translating another language into Python (for > simulation). > > Although it works, I like to know if this a valid construction: Since it works, how can it NOT be a

People who reply to spammers [was: Re: I need some cleanings tips and advice.]

2007-06-22 Thread Steven D'Aprano
On Fri, 22 Jun 2007 16:11:58 +, Colin B. replied to a spammer with: > Let's see if I get this right. > > You create a website for a subject that you know nothing about. Then you > try to solicit content in a bunch of programming language newsgroups. > > Wow, that's pretty pathetic, even for

Re: Collections of non-arbitrary objects ?

2007-06-22 Thread walterbyrd
On Jun 21, 5:38 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > That's a flippant response, but I don't understand the question. Everybody here seems to have about the same response: "why would you ever want to do that?" Maybe it's something that doesn't "need" to be done, but it seems to me that wo

Re: Python plain-text database or library that supports joins?

2007-06-22 Thread Alan Isaac
Not Python, but maybe relevant: http://www.scriptaworks.com/cgi-bin/wiki.sh/NoSQL/HomePage Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Python plain-text database or library that supports joins?

2007-06-22 Thread felciano
> > i don't think that using flat text files as a database is common these > days. if you need relational database features what stops you from > using rdbms? if the only reason for that is some legacy system then > i'd still use in-memory sqlite database for all relational operations. > import, pr

Re: configparser shuffles all sections ?

2007-06-22 Thread Fuzzyman
On Jun 23, 1:14 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Jun 22, 8:28 pm, Stef Mientki <[EMAIL PROTECTED]> > wrote: > > > > > Nick Craig-Wood wrote: > > > stef <[EMAIL PROTECTED]> wrote: > > >> I just used configparser for the first time and discovered that it > > >> shuffled all my sections,

Re: configparser shuffles all sections ?

2007-06-22 Thread Fuzzyman
On Jun 22, 8:28 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > stef <[EMAIL PROTECTED]> wrote: > >> I just used configparser for the first time and discovered that it > >> shuffled all my sections, > >> and the contents of the sections too. > > >> This makes human mani

Re: The Modernization of Emacs

2007-06-22 Thread Matthias Buelow
Twisted wrote: > I find these anecdotes liberally sprinkled into this thread frankly > unbelievable. If you'd spent as much time learning the software as you're ranting about it, you could actually use it _and_ would get the additional benefit of having avoided making a fool of yourself on Usenet

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-22 Thread Paul Rubin
Douglas Alan <[EMAIL PROTECTED]> writes: > People (myself included) haven't had much trouble implementing nice > and useful macro packages for Lisp. Admittedly, it's a harder problem > for a language that doesn't have a Lisp-like syntax. One very simple hack would be to define a syntax extension

contextlib.closing annoyance

2007-06-22 Thread Paul Rubin
it looks like contextlib.closing fails to be idempotent, i.e. wrapping closing() around another closing() doesn't work. This is annoying because the idea of closing() is to let you use legacy file-like objects as targets of the "with" statement, e.g. with closing(gzip.open(filename)) as zf: .

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Cor Gest
Some entity, AKA [EMAIL PROTECTED], wrote this mindboggling stuff: (selectively-snipped-or-not-p) > On Jun 22, 6:32 pm, Cor Gest <[EMAIL PROTECTED]> wrote: > > > HOW IN THE BLOODY HELL IS IT SUPPOSED TO OCCUR TO SOMEONE TO ENTER > > > THEM, GIVEN THAT THEY HAVE TO DO SO TO REACH THE HELP THAT WOUL

Re: Portable general timestamp format, not 2038-limited

2007-06-22 Thread Paul Rubin
James Harris <[EMAIL PROTECTED]> writes: > I have a requirement to store timestamps in a database. Simple enough > you might think but finding a suitably general format is not easy. The > specifics are > > 1) subsecond resolution - milliseconds or, preferably, more detailed > ... There are subtle

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-22 Thread Douglas Alan
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Douglas Alan" <[EMAIL PROTECTED]> wrote in message > | "Terry Reedy" <[EMAIL PROTECTED]> writes: > | > I think this points to where Sussman went wrong in his footnote > | > and Alan in his defense thereof. Flexibility of function -- > | > being able

Re: Packing a simple dictionary into a string - extending struct?

2007-06-22 Thread Jonathan Fine
John Machin wrote: > def unpack(bytes, unpack_entry=unpack_entry): > '''Return dictionary gotten by unpacking supplied bytes. > Both keys and values in the returned dictionary are byte-strings. > ''' > bytedict = {} > ptr = 0 > while 1: > key, val, ptr = unpack_entr

Re: newb: Scope Question

2007-06-22 Thread attn . steven . kuo
On Jun 22, 3:53 pm, johnny <[EMAIL PROTECTED]> wrote: > Scope of ids: > When I print "ids", it's always empty string '', as I have intialized > before. That's not what I want. I want the ids to have > str(r['id']).join(',') > > if res: > ids = '' > for r in res['key

SIMD powered Python

2007-06-22 Thread Bytter
Hi! Is there any I&D ongoing about using SIMD [1] instructions, like SSE [2], to speed up Python, especially regarding functional features, like list comprehension, map and reduce, etc.. ? Best regards, Hugo Ferreira -- [1] http://en.wikipedia.org/wiki/SIMD [2] http://en.wikipedia.org/wiki/Str

Re: The Modernization of Emacs

2007-06-22 Thread Lew
Twisted wrote: > I find these anecdotes liberally sprinkled into this thread frankly > unbelievable. Either they are not using the same software I understand > "emacs" to refer to, or someone somewhere is simply lying. So if someone provides evidence with which you disagree, you accuse them of l

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread nebulous99
On Jun 22, 6:32 pm, Cor Gest <[EMAIL PROTECTED]> wrote: > > HOW IN THE BLOODY HELL IS IT SUPPOSED TO OCCUR TO SOMEONE TO ENTER > > THEM, GIVEN THAT THEY HAVE TO DO SO TO REACH THE HELP THAT WOULD TELL > > THEM THOSE ARE THE KEYS TO REACH THE HELP?! > > What's your problem ? > > Ofcourse a mere prog

Re: newb: Scope Question

2007-06-22 Thread James Stroud
johnny wrote: > Scope of ids: > When I print "ids", it's always empty string '', as I have intialized > before. That's not what I want. I want the ids to have > str(r['id']).join(',') > > if res: > ids = '' > for r in res['key']: > ids = str(r['

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-22 Thread Terry Reedy
"Douglas Alan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | "Terry Reedy" <[EMAIL PROTECTED]> writes: | > I think this points to where Sussman went wrong in his footnote and | > Alan in his defense thereof. Flexibility of function -- being able | > to do many different things --

ANN: Urwid 0.9.8.1 - Console UI Library

2007-06-22 Thread Ian Ward
Announcing Urwid 0.9.8.1 -- Urwid home page: http://excess.org/urwid/ Tarball: http://excess.org/urwid/urwid-0.9.8.1.tar.gz RSS: http://excess.org/feeds/tag/urwid/ About this release: === This is a maintenance release that fixes a number of bugs th

newb: Scope Question

2007-06-22 Thread johnny
Scope of ids: When I print "ids", it's always empty string '', as I have intialized before. That's not what I want. I want the ids to have str(r['id']).join(',') if res: ids = '' for r in res['key']: ids = str(r['id']).join(',')

Re: Adding method to a class on the fly

2007-06-22 Thread attn . steven . kuo
On Jun 22, 2:44 pm, John Henry <[EMAIL PROTECTED]> wrote: > On Jun 22, 2:28 pm, askel <[EMAIL PROTECTED]> wrote: > (snipped) > > The above doesn't exactly do I what need. I was looking for a way to > add method to a class at run time. I'm not sure what you mean by this. Bind an attribute -- a

Re: Portable general timestamp format, not 2038-limited

2007-06-22 Thread Roger Miller
On Jun 22, 10:33 am, James Harris <[EMAIL PROTECTED]> wrote: > I have a requirement to store timestamps in a database. Simple enough > you might think but finding a suitably general format is not easy. > ... > Any thoughts on a better way to do this? (Please reply-all. Thanks). > > -- > James My

Re: The Modernization of Emacs

2007-06-22 Thread nebulous99
On Jun 21, 10:48 am, Lew <[EMAIL PROTECTED]> wrote: > Bjorn Borud <[EMAIL PROTECTED]> writes: > >> so if the context was system administration, I'd vote for vi as > >> well. if the context was programming I'd vote Emacs. > David Kastrup wrote: > > You know you can use something like > > C-x C-f /su

Re: regular expression concatenation with strings

2007-06-22 Thread oscartheduck
Oh dear. I just want to make it clear I wasn't trying to take credit for the change of extension to ext. I genuinely worked it out independently and then rushed back and posted about it, but you definitely worked it out and wrote it up first! Sorry! And thanks for the help!! James On Jun 22, 4

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Falcolas
On Jun 22, 4:12 pm, Pascal Bourguignon <[EMAIL PROTECTED]> wrote: > Anything that the user have to do repeatitively with the GUI, like > copy-and-paste, or reformating of a lot of paragraphs or table > entries, and which is done automatically by writting a one-liner > program in emacs or shell. So

Re: The Modernization of Emacs

2007-06-22 Thread Twisted
On Jun 22, 11:52 am, Bjorn Borud <[EMAIL PROTECTED]> wrote: > [Martin Gregorie <[EMAIL PROTECTED]>] > | > | Yep, and the same people think a command line is to be avoided at all > | costs. "I mean, its so /last century/ and you can't do anything useful > | with it anyway". I think a command line c

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Cor Gest
Some entity, AKA Twisted <[EMAIL PROTECTED]>, wrote this mindboggling stuff: (selectively-snipped-or-not-p) > On Jun 21, 12:03 pm, Robert Uhl <[EMAIL PROTECTED]> wrote: > > Twisted <[EMAIL PROTECTED]> writes: > > > > >> Emacs is amazingly beginner-friendly for the power and flexibility it > > >> p

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread David Golden
Twisted wrote: > You end up having to memorize the help, because *you can't > have arbitrary parts of the help and your document open side by side > and be working on the document*. WTF? Of course you can. http://oldr.net/emacs_two_frames.png > I don't know why people keep harping about what ve

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Pascal Bourguignon
Twisted <[EMAIL PROTECTED]> writes: > The Windows world may have a fair bit to learn from the Unix world > about software reliability and QA, and also about better supporting > task automation. But not about user interface design for when tasks > are done manually. That's the point. Manual tasks

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Pascal Bourguignon
Falcolas <[EMAIL PROTECTED]> writes: > On Jun 22, 3:06 pm, Pascal Bourguignon <[EMAIL PROTECTED]> wrote: >> How do you call a Mac user interface that let a user work during 3 >> hours to do a simple modification to a MS-Word file that takes 15 >> seconds to do with emacs or a simple unix script? >

Re: The Modernization of Emacs

2007-06-22 Thread Twisted
On Jun 21, 11:11 am, Lew <[EMAIL PROTECTED]> wrote: > Joel J. Adamson wrote: > > My point is that I'm the sort of person that has a mind set up for > > Emacs. I had none of the difficulties that someone else might have, > > who's used to other kinds of software. > > > However, I'll also point out

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread David Golden
Twisted wrote: > Of course not. It's too hard to get started using it, so I gave up on > it years ago. So wtf makes you think you're remotely qualified to comment about emacs as it stands today? Idiot. -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression concatenation with strings

2007-06-22 Thread oscartheduck
Got it: #!/usr/bin/env python from PIL import Image import glob, os, re size = 128, 128 def thumbnailer(dir, filenameRx): for picture in [ p for p in os.listdir(dir) if os.path.isfile(os.path.join( dir,p)) and filenameRx.match(p) ]: file, ext = os.path.splitext(picture) im

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Twisted
On Jun 21, 10:52 am, Bjorn Borud <[EMAIL PROTECTED]> wrote: > [Twisted <[EMAIL PROTECTED]>] > | > | Being beginner-friendly doesn't have to be at the expense of power or > | expert-user usability. > > depends on your definition of "expert". :-) Well, admittedly, if your definition of "expert" is "

Re: newbie question: parsing street name from address

2007-06-22 Thread John Machin
On Jun 23, 1:43 am, Eric <[EMAIL PROTECTED]> wrote: > On Jun 21, 6:03 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On Jun 22, 4:43 am, Eric <[EMAIL PROTECTED]> wrote: > > > > On Jun 21, 9:47 am, cjl <[EMAIL PROTECTED]> wrote: > > > > > P: > > > > > I am working on a project that requires ge

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Twisted
On Jun 21, 12:03 pm, Robert Uhl <[EMAIL PROTECTED]> wrote: > Twisted <[EMAIL PROTECTED]> writes: > > >> Emacs is amazingly beginner-friendly for the power and flexibility it > >> provides. [snip] > > > That's a joke, right? I tried it a time or two. Every time it was > > rapidly apparent that doing

Re: Adding method to a class on the fly

2007-06-22 Thread John Henry
On Jun 22, 2:28 pm, askel <[EMAIL PROTECTED]> wrote: > On Jun 22, 5:17 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > > On Jun 22, 2:24 pm, askel <[EMAIL PROTECTED]> wrote: > > > > class Dummy: > > > def method(self, arg): > > > print arg > > > > def method2(self, arg): > > > self.method(arg)

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Twisted
On Jun 21, 11:06 am, [EMAIL PROTECTED] (Joel J. Adamson) wrote: > And it's baloney! No one in my office that uses one of these supposedly > user-friendly machines thinks that it's actually easy to use. They > slam their keyboards and throw their hands up *every* day. Because of bugs or the netwo

Re: Portable general timestamp format, not 2038-limited

2007-06-22 Thread Lew
James Harris wrote: > a) store, as a 32-bit number, days since a virtual year zero (there is > no year zero in common era time ). But according to the same article: > (It [year zero] is, however, used in the astronomical system and ISO 8601.) -- Lew --

Re: regular expression concatenation with strings

2007-06-22 Thread Jacek Trzmiel
Hi, oscartheduck wrote: > I noticed a small error in the code (you referenced extension, which > you had renamed to filenameRx), and when I corrected it I received the > original error again. I haven't had PIL installed, so I just commented out im.* calls for test. Just change: im.save(file +

Re: Adding method to a class on the fly

2007-06-22 Thread askel
On Jun 22, 5:17 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Jun 22, 2:24 pm, askel <[EMAIL PROTECTED]> wrote: > > > class Dummy: > > def method(self, arg): > > print arg > > > def method2(self, arg): > > self.method(arg) > > > Dummy.method2 = method2 > > Dummy.method2('Hello, world!') > > Tra

Re: Adding method to a class on the fly

2007-06-22 Thread 7stud
On Jun 22, 3:23 pm, askel <[EMAIL PROTECTED]> wrote: > sorry, of course last line should be: > Dummy().method2('Hello, world!') ..which doesn't meet the op's requirements. -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression concatenation with strings

2007-06-22 Thread oscartheduck
Shoot, I think I realised what I'm doing wrong. Let me write some code to address this, but I'm almost certain that the error is that I'm attempting to save an image with a regular expression, which is by nature fluid, tacked on to its ass after the .thumbnail. Which, now I look at your code, yo

Re: Adding method to a class on the fly

2007-06-22 Thread askel
On Jun 22, 5:17 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Jun 22, 2:24 pm, askel <[EMAIL PROTECTED]> wrote: > > > class Dummy: > > def method(self, arg): > > print arg > > > def method2(self, arg): > > self.method(arg) > > > Dummy.method2 = method2 > > Dummy.method2('Hello, world!') > > Tra

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread BartlebyScrivener
On Jun 22, 3:47 pm, Twisted <[EMAIL PROTECTED]> wrote: > If it requires years of mastery, it is clunky Well, now you keep harping on this, but it's just not true. I use vim myself, but for purposes of this argument it doesn't matter. If you take the Vim tutorial and use the help (which appears i

Re: Python plain-text database or library that supports joins?

2007-06-22 Thread askel
On Jun 22, 1:18 pm, felciano <[EMAIL PROTECTED]> wrote: > Hello -- > > Is there a convention, library or Pythonic idiom for performing > lightweight relational operations on flatfiles? I frequently find > myself writing code to do simple SQL-like operations between flat > files, such as appending c

Re: Adding method to a class on the fly

2007-06-22 Thread 7stud
On Jun 22, 2:24 pm, askel <[EMAIL PROTECTED]> wrote: > class Dummy: > def method(self, arg): > print arg > > def method2(self, arg): > self.method(arg) > > Dummy.method2 = method2 > Dummy.method2('Hello, world!') Traceback (most recent call last): File "test1.py", line 8, in ? Dummy.

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Falcolas
On Jun 22, 3:06 pm, Pascal Bourguignon <[EMAIL PROTECTED]> wrote: > How do you call a Mac user interface that let a user work during 3 > hours to do a simple modification to a MS-Word file that takes 15 > seconds to do with emacs or a simple unix script? Would you mind elaborating on *what* took 3

Re: regular expression concatenation with strings

2007-06-22 Thread oscartheduck
Hi, I noticed a small error in the code (you referenced extension, which you had renamed to filenameRx), and when I corrected it I received the original error again. What was it you were trying to do to solve the problem, though? Thanks! On Jun 22, 2:41 pm, Jacek Trzmiel <[EMAIL PROTECTED]> wr

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Pascal Bourguignon
Twisted <[EMAIL PROTECTED]> writes: > On Jun 21, 12:09 pm, Robert Uhl <[EMAIL PROTECTED]> wrote: >> Twisted <[EMAIL PROTECTED]> writes: >> >> >> > I have that exact URL now -- >> >> >http://www.asktog.com/columns/027InterfacesThatKill.html >> >> >> Utterly unrelated to Emacs. >> >> > I think it is

SIMD powered Python

2007-06-22 Thread Hugo Ferreira
Hi! Is there any I&D ongoing about using SIMD [1] instructions, like SSE [2], to speed up Python, especially regarding functional features, like list comprehension, map and reduce, etc.. ? Best regards, Hugo Ferreira -- [1] http://en.wikipedia.org/wiki/SIMD [2] http://en.wikipedia.org/wiki/St

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Twisted
On Jun 21, 12:09 pm, Robert Uhl <[EMAIL PROTECTED]> wrote: > Twisted <[EMAIL PROTECTED]> writes: > > >> > I have that exact URL now -- > >> >http://www.asktog.com/columns/027InterfacesThatKill.html > > >> Utterly unrelated to Emacs. > > > I think it is quite relevant. Clunky computer interfaces may

C wrappers and the proxy dilemma

2007-06-22 Thread Ken Seehart
Anyone who has wrapped C or C++ libraries has encountered the proxy dilemma. A long time ago, I naively thought that I could start by deriving my high level python class from the c-python type, but this leads to many difficult problems because several of the underlying methods return the low

Re: Portable general timestamp format, not 2038-limited

2007-06-22 Thread Carsten Haese
On Fri, 2007-06-22 at 13:33 -0700, James Harris wrote: > I have a requirement to store timestamps in a database. Simple enough > you might think but finding a suitably general format is not easy. The > specifics are > > 1) subsecond resolution - milliseconds or, preferably, more detailed > 2) not

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-22 Thread Twisted
On Jun 21, 12:11 pm, Robert Uhl <[EMAIL PROTECTED]> wrote: > Twisted <[EMAIL PROTECTED]> writes: > > >> But Emacs does not have a "clunky" interface. > > > That's for the everyday novice-to-intermediate user to decide. > > Why should the ignorant decide? Do you leave the decision of what great > a

Re: regular expression concatenation with strings

2007-06-22 Thread Jacek Trzmiel
Hi, oscartheduck wrote: > I have a little script that sits in a directory of images and, when > ran, creates thumbnails of the images. It works fine if I call the > function inside the program with something like "thumbnailer("jpg), > but I want to use a regular expression instead of a plain strin

Re: possible to preserve subprocess.Popen objects for later?

2007-06-22 Thread Ratko
> Sounds like you might want to consider running the backround task as > either a service or daemon and communicate via a TCP/IP connection or > a named pipe rather than using STDIN/OUT. Actually you could use > either idea without actually setting up a daemon. Unfortunately I don't have control

Portable general timestamp format, not 2038-limited

2007-06-22 Thread James Harris
I have a requirement to store timestamps in a database. Simple enough you might think but finding a suitably general format is not easy. The specifics are 1) subsecond resolution - milliseconds or, preferably, more detailed 2) not bounded by Unix timestamp 2038 limit 3) readable in Java 4) writabl

Re: Tailing a log file?

2007-06-22 Thread [EMAIL PROTECTED]
On Jun 22, 2:50 pm, "Kenji Noguchi" <[EMAIL PROTECTED]> wrote: > something like this? unix tail command does more fancy stuff > like it waits for timeout, and check if the file is truncated > or depending on incoming data it sleeps seconds , etc etc. > > #!/usr/bin/env python > import sys, select >

Ten years on....

2007-06-22 Thread Clarence
I've been waiting for a month to post this (yesterday), and then I missed it. Oh, well, it's funny and deserves to be republished on its ten-year-and-one-day anniversary. BTW, a member of the ANSI C committee once told me that the only thing rand is used for in C code is to decide whether to pick

Re: Adding method to a class on the fly

2007-06-22 Thread askel
On Jun 22, 3:02 pm, John Henry <[EMAIL PROTECTED]> wrote: > Hi list, > > I have a need to create class methods on the fly. For example, if I > do: > > class Dummy: > def __init__(self): > exec '''def method_dynamic(self):\n\treturn > self.method_static("it's me")''' > return >

regular expression concatenation with strings

2007-06-22 Thread oscartheduck
Hi folks, I have a little script that sits in a directory of images and, when ran, creates thumbnails of the images. It works fine if I call the function inside the program with something like "thumbnailer("jpg), but I want to use a regular expression instead of a plain string so that I can match

Re: Setuptools, build and install dependencies

2007-06-22 Thread Robert Kern
Harry George wrote: > We need to know the dependencies, install them in dependency order, > and expect the next package to find them. "configure" does this for > hundreds of packages. cmake, scons, and others also tackle this > problem. Python's old setup.py seems to be able to do it. No, ge

regular expression

2007-06-22 Thread James
Hi folks, I have a little script that sits in a directory of images and, when ran, creates thumbnails of the images. It works fine if I call the function inside the program with something like "thumbnailer("jpg), but I want to use a regular expression instead of a plain string so that I can match

Re: How to Encode Parameters into an HTML Parsing Script

2007-06-22 Thread SMERSH009X
On Jun 21, 9:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 21 Jun 2007 23:37:07 -0300, <[EMAIL PROTECTED]> escribió: > > > So for example if I wanted to navigate to an encoded url > >http://online.investools.com/landing.iedu?signedin=truerather than > > justhttp://online.investool

is this a valid import sequence ?

2007-06-22 Thread Stef Mientki
This might be a very weird construction, but it's the most easy way in translating another language into Python (for simulation). Although it works, I like to know if this a valid construction: I've defined a class, like this, attaching a not yet defined global to itself class T6963_device (tDe

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-22 Thread Eduardo \"EdCrypt\" O. Padoan
On 6/22/07, John Nagle <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > P.S. I agree with the sentiment that the annotations feature of Python > > 3000 seems like a lot of baggage. Aside from some benefits around > > writing C/C++/Java wrappers, it's the lowest common denominator type > > annota

Re: comparing two lists and returning "position"

2007-06-22 Thread hiro
On Jun 22, 2:00 pm, hiro <[EMAIL PROTECTED]> wrote: > On Jun 22, 1:58 pm, hiro <[EMAIL PROTECTED]> wrote: > > > > > On Jun 22, 1:56 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > > > In <[EMAIL PROTECTED]>, hiro wrote: > > > > Hi once again, Charles.. I have tried your approach in my d

Re: configparser shuffles all sections ?

2007-06-22 Thread Stef Mientki
Nick Craig-Wood wrote: > stef <[EMAIL PROTECTED]> wrote: >> I just used configparser for the first time and discovered that it >> shuffled all my sections, >> and the contents of the sections too. >> >> This makes human manipulation of the file impossible. >> >> Is there a way to prevent this

  1   2   3   >