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
13 matches
Mail list logo