y probably just deliver
the mail locally or forward them to a local message queue for a separate
SMTP sender).
Hope that helped a bit,
Alan Plum
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
gt; a
xrange(20, 30)
>>> a[0]
20
>>> a[-1]
29
Please note that the border will always be one step off if you're
looking for the values you originally provided: the endpoint is always
given as exclusive.
If you want to know the step, you probably need to calcu
ples.
words = []
w = ('aimer', 'love')
words.append(w)
The only problem with this approach is that it's not as easy to use as a
dict, but as I was doing a word trainer, it was supposed to be randomly
accessed anyway.
Cheers,
Alan Plum
___
ent is usually used for).
In the case of your code, your lambda was:
lambda x: x[0]
and
lambda x: x[1]
If applied to a tuple or list, this works like this:
>>> mytuple = ('a','b')
>>> l1 = lambda x: x[0]
>>> l2 = lamb
Ahoy!
On Do, 2009-11-12 at 06:34 +0300, Khalid Al-Ghamdi wrote:
> can anyone tell me why on python 2.6 i can enter os.environ and then
> get all the items that that pertain to the os while on python 3 you
> just get the following:
>
> with no items?
Seems like os.environ has changed a little si
Ahoy!
On Sa, 2009-11-14 at 20:49 +, Stephen Nelson-Smith wrote:
> He's an absolute beginner with no programming experience at all. I
> think he might be following 'Python Programming for the Absolute
> Beginner", or perhaps some online guides. Should I advise him to
> stick with 2.6 for a bi
On So, 2009-11-15 at 15:12 +, Stephen Nelson-Smith wrote:
> > To upack your variables a and b you need an iterable object on the right
> > side, which returns you exactly 2 variables
>
> What does 'unpack' mean? I've seen a few Python errors about packing
> and unpacking. What does it mean?
Dammit. Meant to send this over the list. Sorry, Alan.
On Di, 2009-11-17 at 21:33 +, Alan Gauld wrote:
> Unices, like Linux have file association tables - but these
> are often associated with the desktop environment - KDE, Gnome etc.
> Finally for text files you should check the EDITOR and V
Ahoy!
On Di, 2009-11-24 at 23:47 +, chombee wrote:
> I'm using the standard mailbox module to read a maildir, but it seems to
> be quite difficult to do some simple things. Is there any way to
> identify a message as new, unread, unseen or something similar? What
> about finding the most re
On Mi, 2009-12-02 at 13:08 -0500, Robert Berman wrote:
> Hi,
>
> I am trying to represent a number as a list of bits: for example the
> bit representation of the integer 8. I did find a number of articles
> pertaining to a module called bitarray but I was unable to
> download/install that package.
On Fr, 2009-12-04 at 08:21 +0100, spir wrote:
> By the way, is there any reason why the compare func parameter is called
> 'key'?
I'd guess because what you provide creates keys for the values in the
collection to sort them by. What else to call it? "Comparators" compare
two values, "hashes" don'
nd ready for use, Google is your
friend. Depending on what you use there are plenty of CGI-compatible
packages and WSGI frameworks to choose from.
Cheers,
Alan Plum
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
any non-commercial authorities will still trigger security
warnings in most browsers, so the only way to get one that isn't
counter-productive (i.e. diminishes trust rather than increasing it --
dodgy certificates are still valid certificates) is to shell out the big
money -- and unless you'
On Di, 2009-12-22 at 10:53 +0100, MK wrote:
> Hi there,
>
> i have some logical problem. I dont get it done to write my for loops in
> that way that the ip address range which is given as arguments are
> correct processed. Meaning that only the ips are printed which the
> user defines as argument.
ip in range(start, end+1):
blocks = []
for i in range(4):
blocks.append((ip & (0xff << (8 * i))) >> (8 * i))
print '.'.join(blocks)
Hope this helps. I haven't run this code, so you might want to make sure
it works correctly before using it.
Cheer
Hi again,
On Di, 2009-12-22 at 12:46 +0100, Alan Plum wrote:
> # Now generate the addresses:
> for ip in range(start, end+1):
> blocks = []
> for i in range(4):
> blocks.append((ip & (0xff << (8 * i))) >> (8 * i))
> print '.'.join
want to refactor this into an object.
Cheers,
Alan Plum
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
17 matches
Mail list logo