Re: option argument length

2005-12-04 Thread Nicolas Couture
I don't think that's actually what you want to do. Yes arguments are not to be used directly as option arguments (otherwise why have option arguments anyways ;-) but each option argument is usually evaluated under the evaluation of the actual option and optparse will error on invalid use of the opt

Re: Basic Server/Client socket pair not working

2005-08-29 Thread Nicolas Couture
Michael Goettsche wrote: > Hi there, > > I'm trying to write a simple server/client example. The client should be able > to send text to the server and the server should distribute the text to all > connected clients. However, it seems that only the first entered text is sent > and received. When

Re: Generating a list of None

2005-07-14 Thread Nicolas Couture
of course the later snipplet should be: --- def get_options(opts): """Return True or False if an option is set or not""" vals = opts.__dict__.values() if vals == [None * len(vals)]: return False return True --- -- http://mail.python.org/mailman/listinfo/python-list

Generating a list of None

2005-07-14 Thread Nicolas Couture
Hi, Is it possible to generate a list of `None' ? opts.__dict__.values() below could be represented by [None, None, None] --- def get_options(opts): """Return True or False if an option is set or not""" vals = opts.__dict__.values() for val in vals: if val is not None: