Delaney, Timothy (Tim) wrote:
> You have to admit though, he's remarkably good at getting past
> Spambayes. Despite classifying *every* Xah Lee post as spam, he still
> manages to get most of his posts classified as 0% or 1% spam.
Hmm, perhaps he's using steganography. Maybe the emails actually
I've been writing Python-related articles on my weblog, and I thought
planet.python.org might be interested in including them. Does anyone
know how to submit a feed to the aggregator?
http://hathawaymix.org/Weblog/rss20.xml?categories:list=Python
Shane
--
http://mail.python.org/mailman/listin
Adam Endicott wrote:
> Claudio Grondi wrote:
>
>>Why is PIL *(Python Image Library) not suitable to do the graphics?
>>
>>http://www.pythonware.com/products/pil/
>>
>>Claudio
>
>
> I am using PIL for some other things, but what I need ImageMagick for
> is to convert a PDF into a series of jpegs
Here's a heretical idea.
I'd like a way to import modules at the point where I need the
functionality, rather than remember to import ahead of time. This might
eliminate a step in my coding process. Currently, my process is I
change code and later scan my changes to make matching changes to t
Benji York wrote:
> Why not: 1) jump to the top of the file when you need to do an import
> (1G in Vim), 2) add the import, 3) jump back to where you were (Ctrl-o
> in Vim) and keep coding. This isn't Vim specific, I suspect all decent
> editors have similar capabilities (I know Emacs does). T
Benji York wrote:
> OK, good. You won't have to worry about that. :)
You didn't give a reason for disliking it.
Shane
--
http://mail.python.org/mailman/listinfo/python-list
Xavier Morel wrote:
> Shane Hathaway wrote:
>
>>Thoughts?
>
>
> >>> import re; name_expr = re.compile('[a-zA-Z]+')
> >>> name_expr
> <_sre.SRE_Pattern object at 0x00F9D338>
> >>>
>
> the import statement can be
Mike Meyer wrote:
> Shane Hathaway <[EMAIL PROTECTED]> writes:
>>I'd like a way to import modules at the point where I need the
>>functionality, rather than remember to import ahead of time. This
>>might eliminate a step in my coding process. Currently, my proc
Mike Meyer wrote:
> Shane Hathaway <[EMAIL PROTECTED]> writes:
>>That syntax is verbose and avoided by most coders because of the speed
>>penalty.
>
>
> What speed penalty? "import re" is a cheap operation, every time but
> the first one in a program.
Kent Johnson wrote:
> Shane Hathaway wrote:
>>I'm talking about using imports *everywhere*. The penalty would be
>>appreciable.
>
>
> Have you tried it?
>
> D:\Projects\CB>python -m timeit -s "import re" "import re"
> 100 loops,
Let's talk about the problem I really want help with. I brought up a
proposal earlier, but it was only half serious. I realize Python is too
sacred to accept such a heretical change. ;-)
Here's the real problem: maintaining import statements when moving
sizable blocks of code between modules
Steve Holden wrote:
> Shane Hathaway wrote:
>> The structure of the Java language makes this relatively easy.
>>
>
> And there's so much more busywork in Java that it's probably worth
> automating. See
>
>http://www.artima.com/weblogs/viewpost.jsp?
Jean-Paul Calderone wrote:
> On Sat, 10 Dec 2005 02:21:39 -0700, Shane Hathaway <[EMAIL PROTECTED]> wrote:
>>How about PyLint / PyChecker? Can I configure one of them to tell me
>>only about missing / extra imports? Last time I used one of those
>>tools, it spewed ex
Chris Mellon wrote:
> On 12/10/05, Shane Hathaway <[EMAIL PROTECTED]> wrote:
>>I'm surprised this problem isn't more familiar to the group. Perhaps
>>some thought I was asking a newbie question. I'm definitely a newbie in
>>the sum of human knowledge, bu
Remi Villatel wrote:
> Hi there,
>
> There is always a "nice" way to do things in Python but this time I can't
> find one.
>
> What I'm trying to achieve is a conditionnal loop of which the condition
> test would be done at the end so the loop is executed at least once. It's
> some way the opp
[EMAIL PROTECTED] wrote:
> Can anybody provide a mirror for this module? The original URL seems to
> be down. I have been looking for over an hour, and every single
> resource that uses it links to the timo-tasi.org site to download it.
FWIW, Python 2.3+ has the timeout functionality built in, so
[EMAIL PROTECTED] wrote:
> What's the difference between time.clock() and time.time()
> (and please don't say clock() is the CPU clock and time() is the actual
> time because that doesn't help me at all :)
>
> I'm trying to benchmark some function calls for Zope project and when I
> use t0=time.cl
Magnus Lycka wrote:
> Shane Hathaway wrote:
>
>>time.time() measures real time, while time.clock() measures the time the
>>CPU dedicates to your program.
>
>
> I suppose that varies with the platform... "help(time.clock)" says:
>
>
I started experimenting with SOAPpy yesterday and immediately hit a
snag. Both web services I tried simply hung and never replied. After a
lot of digging, I found out what was going wrong: urllib.urlopen() is
issuing an HTTP/1.0 request, but Microsoft IIS 5 ignores the client HTTP
version and
Kent Johnson wrote:
> Brian Sabbey wrote:
>> Using suite-based keyword arguments, the code
>>
>> f(x = 1)
>>
>> is equivalent to
>>
>> f():
>>x = 1
>
>
> ISTM the syntax is ambiguous. How do you interpret
> if f():
> x = 1
> ?
>
> Is a suite alllowed only when a block could not be introduc
Brian Sabbey wrote:
> Maybe using '**' would be better than '...' since it already is used to
> indicate keyword arguments. Example:
>
> class C(object):
> x = property(**):
>doc = "I'm the 'x' property."
>def fget(self):
> return self.__x
>def fset(self, val
Szabolcs Nagy wrote:
> it's not quite true since the latest stable release (2.6.0.0)
>
> see the new wx doc (it's generated with epydoc so it's not for C++):
> http://www.wxpython.org/docs/api/
>
> i used wxPython with XRCed a few times and i liked the way it works
> (worked under linux and win a
Jeff Winkler wrote:
> I've come up with a trigraph idiom, am curious if it's been done before
> (probably). I like to use trigraphs occasionally.
>
> Scenario: I'm doing an RSS->Javascript conversion for our intranet. I'd
> like to use different CSS class if a post is new. Code:
>
> hoursOld=abs(
pythonchallenge wrote:
> For the riddles' lovers among you, you are most invited to take part
> in the Python Challenge, the first python programming riddle on the net.
>
> You are invited to take part in it at:
> http://www.pythonchallenge.com
That was pretty fun. Good for a Friday. Too bad it
darren kirby wrote:
> quoth the Shane Hathaway:
>
>>pythonchallenge wrote:
>>
>>>For the riddles' lovers among you, you are most invited to take part
>>>in the Python Challenge, the first python programming riddle on the net.
>>>
Benji York wrote:
> Shane Hathaway wrote:
>
>> Benji York wrote:
>>
>>> OK, good. You won't have to worry about that. :)
>>
>>
>> You didn't give a reason for disliking it.
>
>
> Oh, I don't particularly dislike it.
Paul McGuire wrote:
> "Paul McGuire" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>
>>Well *I'm* certainly looking forward to learning some new tricks! My
>>(non-cheat) version is a comparatively-portly 245, and no alternatives are
>>popping into my head at the moment!
>>
>>--
Tim Hochberg wrote:
> Paul McGuire wrote:
>
>>"Shane Hathaway" <[EMAIL PROTECTED]> wrote in message
>>news:[EMAIL PROTECTED]
>>
>>
>>>I'm down to 133 characters (counted according to 'wc -c') on a single
>>>line.
I just found a 125 character solution. It's actually faster and more
readable than the 133 character solution (though it's still obscure.)
It depends on Python 2.4. If Python 2.3 compatibility is required for
the contest, I have to add 4 characters.
Shane
[EMAIL PROTECTED] pycontest_01]$ wc
Andrew Durdin wrote:
> On 12/28/05, Shane Hathaway <[EMAIL PROTECTED]> wrote:
>
>>I just found a 125 character solution. It's actually faster and more
>>readable than the 133 character solution (though it's still obscure.)
>
>
> Having spent a go
Tim Hochberg wrote:
> g=''.join;seven_seg=lambda i:g(
> g(' _|x|'[ord("~$]m'k{d\x7fo"[int(n)])>>s&j]
> for n in i for j in(2,1,4))+'\n'for s in(6,0,3))
>
> I've replaced the unprintable characters and added some preemptive
> linebreaks so that hopefully this won't get too munged. It's all clear
Szabolcs Nagy wrote:
> my two solutions (well I wasn't so clever to encode everything in
> strings instead of numbers, but at least it won't give warnings about
> non ascii characters):
> 128:
> j,seven_seg=''.join,lambda s:j(j(' |_ |'[i>>3*int(c)&b]for c in s for b
> in(4,2,1))+'\n'for i in(306775
André wrote:
> For the few that might be interested, I will be posting the details of
> a 117 character long solution to the challenge on my blog
> http://aroberge.blogspot.com/.
>
> Enjoy!
You took advantage of prime numbers, enabling you to extract encoded
information using a single modulus op
Claudio Grondi wrote:
> so I tried all which made sense in the context of '0' conversion and
> found out, that it should be the
>
>' _ |_|_ _| |'
>
> not the at http://aroberge.blogspot.com/
>
>' _ |_|_ _| |'
The HTML source has the three spaces. If the code had been surrounded
by
[EMAIL PROTECTED] wrote:
> Perhaps this is one reason why programmers are so passionate, and even
> religious, about their programming tools; because they intuitively
> sense that we are dealing with ideas that, however crudely, mirror
> eternal realities of immense significance.
While I don't ass
Levi Campbell wrote:
> what is /usr/lib/libpython2.4.so used for?
>
On many systems, it is the core of Python, and /usr/bin/python2.4 is a
small wrapper around it. Here's what I see on my box:
[EMAIL PROTECTED] usr]$ ls -l bin/python2.4 lib/libpython2.4.so.1.0
-rwxr-xr-x 1 root root4072 O
John Salerno wrote:
> >>> class Foo(object):
> pass
>
> >>> dir(Foo)
> ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__',
> '__hash__', '__init__', '__module__', '__new__', '__reduce__',
> '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__']
>
> Hmm
John Salerno wrote:
> Shane Hathaway wrote:
>
>> Don't forget to file a bug.
>
> I'm reluctant to call it a bug just yet. Here's more stuff below.
> There's obviously a difference between old- and new-style classes. It
> seems that as far as new-sty
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
>> Then perhaps you or he could explain it to us less intelligent
>> people in very simple terms?
>
> the security advisory explains that the cause of the problem is a bug
> in the source code used to implement repr() for 32-bit Unicode strings,
Fredrik Lundh wrote:
> Shane Hathaway wrote:
>
> > I don't know if this concern applies to Starship specifically, but it
> > seems to apply to thousands of web sites running Python CGIs and
> > Python web servers.
>
> so are we seeing thousands of we
robert wrote:
> I'd like to use multiple CPU cores for selected time consuming Python
> computations (incl. numpy/scipy) in a frictionless manner.
>
> Interprocess communication is tedious and out of question, so I
> thought about simply using a more Python interpreter instances
> (Py_NewInterpret
Gregory Piñero wrote:
> Are there security issues too? Would you remove potentially harmful
> Python libraries for the plugin, not allow system calls, etc? Would
> you only allow file system access in one area?
Ah, so you also want to distribute untrusted Python code. That's fairly
hard. There
Alex Biddle wrote:
> Ah, so separate downloads then. At least now I know.
>
> Ergh... I checked the version of Python my current host is running and its
> 2.2.
>
> ...ergh
This is why you really want a VPS (virtual private server). The cost is
similar to a web host but you get to choose yo
Gregory Piñero wrote:
> I was just idley curious on what it would take to make a web plug-in
> for Pygame. I'm picturing it working the way my browser currently
> shows flash games. Is such an idea even possible? Has anyone
> attempted this?
I once played with a similar idea. Yes, it's possibl
Alex Biddle wrote:
> Ah, so separate downloads then. At least now I know.
>
> Ergh... I checked the version of Python my current host is running and its
> 2.2.
>
> ...ergh
This is why you really want a VPS (virtual private server). The cost is
similar to a web host but you get to choose yo
Alex Biddle wrote:
> Ah, so separate downloads then. At least now I know.
>
> Ergh... I checked the version of Python my current host is running and its
> 2.2.
>
> ...ergh
This is why you really want a VPS (virtual private server). The cost is
similar to a web host but you get to choose y
Gregory Piñero wrote:
> Shane Wrote:
>> Ah, so you also want to distribute untrusted Python code. That's fairly
>> hard. There's a discussion about it on Python-Dev right now.
>
> Well, I want to write a game in Pygame, and people can just go to my
> website and play it within their browser. I
[EMAIL PROTECTED] wrote:
> Ben Finney wrote:
>> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
>>
>>> Yes, it's true that you can't resell copies of The Python Papers for
>>> personal profits, but you may derive from it, reproduce and
>>> propagate it. You're quite right to point it out.
>> Then p
Calvin Spealman wrote:
> No matter what I do I cant get the following code to do what I expect.
> I hadn't used subprocess t o read and write to pipes of a
> still-running app, and I just can't seem to get it right. What gives?
>
> import subprocess
>
> p = subprocess.Popen("python", stdout=subpr
Torsten Bronger wrote:
> Hallöchen!
>
> "Kay Schluehr" <[EMAIL PROTECTED]> writes:
>
>
>>[...]
>>
>>[...] Once You get enough speed out of the PyPy-runtime and the
>>community shifts to it the PEP-process degenerates in the view of
>>a PyPythonista to discussions about aspects of the std-objects
Mike Meyer wrote:
> Basically, there's a *lot* of history in programming languages. I'd
> hate to see someone think that we went straight from assembler to C,
> or that people didn't understand the value of dynamic languages very
> early.
Yes, although I wasn't following historical events; I was f
George Sakkis wrote:
> "Christopher J. Bottaro" wrote:
>
>
>>Cool signature, can anyone do a Python one that I can leech? =)
>>
>>-- C
>>
>
>
> Here's the transliteration in python for your address:
>
> python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
> for p
Mike Meyer wrote:
> On a completely different topic, this looks like the wrong way to solve
> the problem. You want to update a search engine based on changes to the
> underlying file system. The right way to do this isn't to just keep
> rescanning the file system, it's to arrange things so that yo
Michael wrote:
> sorry, I'm used to working in c++ :-p
>
> if i do
> a=2
> b=a
> b=0
> then a is still 2!?
>
> so when do = mean a reference to the same object and when does it mean make
> a copy of the object??
To understand this in C++ terms, you have to treat everything, including
simple inte
rzed wrote:
> That's all I'm talking about here. To be able to write a Python
> application that can ultimately be displayed using wxWidgets or Qt
> or Tkinter or Curses. Then, without having to do more than to
> change which interface package is imported, to expect to see the
> result displaye
Sergiy wrote:
> print 1 / 2
> print -1 / 2
>
> 0
> -1
>
> correct?
Yes. It works like the floor() function.
>>> import math
>>> math.floor(1.0 / 2)
0.0
>>> math.floor(-1.0 / 2)
-1.0
Shane
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> As the only director of the Python Software Foundation to vote against a
> recent Board motion to implement the change in licensing terms described in
>
>http://pyfound.blogspot.com/2006/04/python-25-licensing-change.html
I must saay that i am fully in favor of this cha
57 matches
Mail list logo