ts what done before by psyco:
http://psyco.sourceforge.net/
No need for a decorator though.
--
Florian Ludwig
--
http://mail.python.org/mailman/listinfo/python-list
>>>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def foo():
"""Some ütf-8 docstring ∑ g⊙f (x)"""
return False
<<>> help(test)
Help on module test:
NAME
test - # -*- coding: utf-8 -*-
FILE
/tmp/test.py
FUNCTIONS
On Tue, 2010-02-16 at 19:20 +0100, Diez B. Roggisch wrote:
> Am 15.02.10 23:12, schrieb Florian Ludwig:
> > On Sun, 2010-02-14 at 18:47 +0100, Diez B. Roggisch wrote:
> >>> Here there problem with the trac (and other plugin systems I've
> >> seen)
> >&g
On Tue, 2010-02-16 at 16:14 +0100, Paul Kölle wrote:
> Am 15.02.2010 23:12, schrieb Florian Ludwig:
> > On Sun, 2010-02-14 at 18:47 +0100, Diez B. Roggisch wrote:
> >> [...]
> >> And then of course, this is not really needed. In Python, behavior
> >> counts,
or some input as well and posted some days back
about a similar topic. Maybe some of the thoughts expressed there might
help you as well:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/0a210267753919b0/5add7bc93789b418
Florian
--
Florian Ludwig
signature.asc
Descriptio
ttp://dpaste.com/hold/159634/
Now putting both together:
> import pbus
>
> import wiki
> import auth_openid
> # or: import auth_shibboleth
>
> pbus.get("wiki").run()
No interface definitions.
What do you think? Any obvious pitfalls (besides reinventing somethi
On Sun, 2010-02-14 at 10:16 +0100, Paul Kölle wrote:
> Am 13.02.2010 10:50, schrieb Florian Ludwig:
> > Hi,
> >
> > I'm looking for a module/plugin/intra-process-communication/hook system
> > for python. Maybe someone here could point me to some project I missed
&
Hi,
I'm looking for a module/plugin/intra-process-communication/hook system
for python. Maybe someone here could point me to some project I missed
or might have some good ideas if I end up implementing it myself.
Most systems I have found are "one to many" communications but I would
like "many to
<[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
>
> from collections import defaultdict
> da=defaultdict(int)
> for x in [10]:
>for y in [11]:
>da[abs(x-y)]+=1
Thangs,
collections are a real good idea.
I will use this version.
Ernsst-Ludwwig Brust
--
http://mail.p
"Ben Finney" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> "Ernst-Ludwig Brust" <[EMAIL PROTECTED]> writes:
>
> So, generator expressions can be a powerful way to clarify the purpose
> of a section of code. They can be over-used, t
.
But, i used the idea of pruebauno,
as this is faster.
Ernst-Ludwig Brust
--
http://mail.python.org/mailman/listinfo/python-list
Given 2 Number-Lists say l0 and l1,
count the various positiv differences between the 2 lists
the following part works:
dif=[abs(x-y) for x in l0 for y in l1]
da={}
for d in dif: da[d]=da.get(d,0)+1
i wonder, if there is a way, to avoid the list dif
Ernst-Ludwig Brust
--
http
On 21 Mai, 00:12, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 20 May 2008 16:22:10 -0300, Joe P. Cool
> <[EMAIL PROTECTED]> escribió:
>
>
>
> > Ludwig Miniatur wrote:
> >> For example:
> >> #!/usr/bin/env python
>
> &g
omment
Looks like a little bug in parser; but what I don't understand is that
I thought parser was build with the current syntax of python.
So, why can python run the script (an it can if you comment out the
line "ast = suite(s)") but parser can't?
Looking forward for answ
This is not a bug, this is how it should work.
A triple quoted string ends only with another triple quoted string (which
can extend over multiple lines) In your example you are escaping the first
quote character at the end of the line, thus leaving just two quotes that do
not end the string.
Anoth
Hi,
I am attempting to detect mouse clicks from within curses, using
"select" on sys.stdin. It is working great within an xterm under X, but
not very well in a "real" linux console. When I click my mouse while on
the "real" console, nothing happens at first, even on repeated clicks.
Once I press a
Just for completeness: The functions in Steve's original post named
maximum calculate the minimum.
Also, timing-wise, on my machine with a random list of 20 integers
Steve's iteration version and Mitja's version are about equal, the
system built-in is equal or slightly slower, and Paul's versi
>>> senderlist="na nu [EMAIL PROTECTED] hu [EMAIL PROTECTED] [EMAIL PROTECTED]
>>> fa hu"
>>> print [ s[0] for s in re.findall("(\w+@(\w+\.)+\w+)",senderlist) ]
['[EMAIL PROTECTED]', '[EMAIL PROTECTED]']
--
http://mail.python.org/mailman/listinfo/python-list
I think the problem is this line:
> x == input('What is x now?: ')
which should not have a == but a =
--
http://mail.python.org/mailman/listinfo/python-list
With that terse description and the subject line I would interpret the
OP like so:
>>> print re.sub(".*\.",".","0.666")
.666
>>> print re.sub(".*\.",".","123.666")
.666
--
http://mail.python.org/mailman/listinfo/python-list
Actually under Linux he could probably pipe "clri %d" to debugfs if
that is what he wanted to do. On the other hand he said "unix
environment" which could be anything really.
--
http://mail.python.org/mailman/listinfo/python-list
> under SunOS there was a way to delete a file given it's i-node.
Yes and no. You probably mean "clri" which cleared the inode, but did
not "remove the file", i.e. all the entries in directories pointing to
it.
In older Unices there was also "ncheck" to find the filesystem names
for inode numbers
Perhaps this is what he means:
re.sub("http://[^/]*/","/","http://palle.fi/wing/walla.htm";)
'/wing/walla.htm'
--
http://mail.python.org/mailman/listinfo/python-list
Good answer. :) I seriously doubt it is possible except for the
trivial solution:
def remove_a_file(inode):
os.system ("find / -inum %d | xargs rm -f" % (inode))
PS. Don't blame me if this function destroys your hard disk. I wrote it
off the top of my head.
--
http://mail.python.org/mailm
Maybe he means: sys.path.append('/my/path')
--
http://mail.python.org/mailman/listinfo/python-list
That man is a genius:
>>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>>> s.connect(("gmail.com",80))
>>> print s.getsockname()
('192.168.0.174', 2768)
>>> s.close()
Should work on Windows as well.
--
http://mail.python.org/mailman/listinfo/python-list
Sorry to have caused all that confusion. The quote from RFC822 I gave
is really confusing and is indeed not relevant to the original
question. As Tim pointed out, the "to_addrs" parameter in
smtplib.py::sendmail is translated to the SMTP RCPT TO and thus must
contain all the intended recipients whe
The second solution can give really weird results though, e.g. on my
Linux system I get:
>>> gethostbyaddr(gethostname())
('linux.site', ['linux'], ['127.0.0.2'])
A more flexible but potentially unportable way would be:
>>> import socket
>>> import fcntl
>>> import struct
>>>
>>> def get_ip_addr
> Can anyone suggest how I can get round this? I have attempted numerous
> things, like making my recipient list = [''], but Exchange then tried
> to send the mail to "[EMAIL PROTECTED]" .
rfc822: Note that the "Bcc" field may be empty, while the "To"
field
rfc822: is required to have a
Seems like you are not providing a full path to the file 'check.jpg'.
How is your program supposed to know where in the filesystem it
is located? Either that, or you have to put the file in the same
directory that on which the program is running.
Also, you should use two backslashes in the name: p
30 matches
Mail list logo