On Mar 29, 2005, at 10:36 AM, Peter Hansen wrote:
Sorry for the rant... I didn't intend it to head
that way when I started out, but I seem to be on a
bit of an anti-optimization bent today. :-)
No, that's very helpful; thanks.
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
sses
local variables much more efficiently than global variables."
These two pieces of advice imply opposite kinds of code revisions.
Obviously they have different purposes, and both are right at different
times. I wonder if anyone has some wisdom about how to think about when
or how often to d
I very much take your point. And thanks: that answers my syntax
question (I think!) -- *and* tells me that I don't care.
Charles Hartman
On Mar 27, 2005, at 2:16 PM, [EMAIL PROTECTED] wrote:
...
>>> simpler == complexities
True
>>>
I've not the glimmer of a clue whic
onary whose keys are those two-item tuples and whose values are
the integers returned by self._measureComplexity
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
s is quite cool, and it looks as though it would work
with more complicated function calls than the ones in my toy example.
Thanks.
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
er/_sandbox.py", line 1, in addone
# Used internally for debug sandbox under external interpreter
TypeError: unsupported operand type(s) for +: 'function' and 'int'
)
I hope the question is clear enough. I have a feeling I'm ignoring a
simple technique . . .
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
n marks and the like.
Is there some well-known way to filter or translate this w.p. garbage?
I don't know whether encodings are relevant; I don't know what encoding
an MSW file uses. I don't see how to use s.translate() because I don't
know how to predict what the incoming for
ecially six months later.
I'm sure people who know a lot better what they're talking about will
have more thorough answers for you.
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
ython docs is funny, and the didactic pose of the whole
post is . . . derisory. The motive for the post escapes me, or I hope
it does.
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 23, 2005, at 7:10 PM, [EMAIL PROTECTED] wrote:
7. (",) Do You Want To Know For Sure You Are Going To Heaven?
Is there no way of filtering this recurring offensive material from the
list?
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
Maybe you can bind Festival
(http://www.cstr.ed.ac.uk/projects/festival/download.html) with SWIG.
Presumably somebody could; at this point it's well beyond me. But thank
you for the suggestion.
Charles Hartman
http://cherry.conncoll.edu/cohar
--
http://mail.python.org/mailman/listinfo/p
On Mar 20, 2005, at 4:10 PM, Francis Girard wrote:
Hello M. Hartman,
It's a very big opportunity for me to find someone that both is a poet
and
knows something about programming.
First, please excuse my bad english ; I'm a french canadian.
My French is a great deal worse than your English; fear n
even directly talked about in the boolk) that there came a
casual remark from a reader last year which led to the Scandroid.
Charles Hartman
"The time has come for someone to put his foot down; and that foot is
me." --Animal House
On Mar 20, 2005, at 2:10 AM, Tim Churches wrote:
platforms, but I guess I'm asking too much -- it's too hardware
dependent, I suppose. Any hints?
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
simple way for 'darwin'. Many thanks!
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
though yes I *can* navigate to the right
place.)
This is pretty much the same code I use when the user selects "Load
text file," and the app goes straight to the right directory (its own
directory), where it finds a sample text file I supply. Is os.getcwd()
working differently in the
offer more efficient solutions.
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com
want to modify a string in the following way :
for s in stks:
s = s.strip()
if ( s[-2:] == ‘GR’ ):
s[-2:]= ‘GF’
so, if the
s how you tell
Python you're entering an octal number. (Parallel to 0x for
hexadecimals.) So beware of 010, which isn't the number of fingers you
presumably have, unless you don't count the thumbs.
Charles Hartman
--
http://mail.python.org/mailman/listinfo/python-list
Won't extend this except to say thanks to Michael Spencer for another
version. If I were doing it only once I'd use that. Since I do it more
than once I should package it as a function.
Thanks.
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/
ired changing > into >=, which even I can't screw up.
Thanks to everyone who's helped on this. Makes me wish I were going to
pycon.
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com
Kent Johnson wrote:
It's
it's any more efficient and/or elegant than what
I've got now. Hm -- lots to think about here. Thank you.
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com
pat = sre.compile('(x[x/])+')
(longest, startlongest) = ma
Charles Hartman <[EMAIL PROTECTED]> wrote:
I'm still shaky on some of sre's syntax. Here's the task: I've got
strings (never longer than about a dozen characters) that are
guaranteed to be made only of characters 'x' and '/'.
One possibility i
--which I don't understand. (The program is a GUI one using wxPython
2.5, running from within the WingIDE on a Mac under OS 10.3.8, if any
of that makes a difference. Nothing there prevents hotshot from loading
a file that's been made without the lineevents=1 argument.)
Charles H
the details (I'm
even shakier on generators than I am on regexes!) and (2) that *seems*
likely to be less efficient, maybe by a large enough factor that the
obnoxiousness of getting the first search-return seven times is
something I should just swallow.
What magic am I missing?
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
from within the WingIDE on a Mac under OS 10.3.8, if any
of that makes a difference. Nothing there prevents hotshot from loading
a file that's been made without the lineevents=1 argument.)
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
25 matches
Mail list logo