Re: [Tutor] Groups of mutually exclusive options

2014-04-21 Thread Steven D'Aprano
On Mon, Apr 21, 2014 at 08:26:41PM -0400, rail shafigulin wrote: > For example say I have a the script with called myscript.py which can take > two groups of options > > group1 > option1a > option1b > option1c > group2 > option2a > option2b > otpion2c > > I can run this s

Re: [Tutor] Groups of mutually exclusive options

2014-04-21 Thread Steven D'Aprano
On Mon, Apr 21, 2014 at 05:05:49PM -0400, rail shafigulin wrote: > Does anybody know if there is a way to specify groups of mutually exclusive > options using argparse module? I'm not an expert on argparse, but I think not. If I've understand correctly, this seems to suggest that argparse does no

Re: [Tutor] Groups of mutually exclusive options

2014-04-21 Thread Steven D'Aprano
On Mon, Apr 21, 2014 at 05:37:28PM -0700, Alex Kleider wrote: > On 2014-04-21 14:05, rail shafigulin wrote: > >Does anybody know if there is a way to specify groups of mutually > >exclusive > >options using argparse module? > > > > As someone pointed out on this list some months ago, you might wa

Re: [Tutor] Groups of mutually exclusive options

2014-04-21 Thread Alex Kleider
On 2014-04-21 14:05, rail shafigulin wrote: Does anybody know if there is a way to specify groups of mutually exclusive options using argparse module? As someone pointed out on this list some months ago, you might want to consider using docopt instead of argparse. It is much more in keeping

Re: [Tutor] Groups of mutually exclusive options

2014-04-21 Thread rail shafigulin
> > >> > Sorry, I didn't follow your example. Can you explain what you mean in > English? What would be the outcome if you succeeded? > What could the user do and not do? The idea is to use two groups of parameters. The user can use only one group of parameters. For example say I have a the scri

Re: [Tutor] Beginning Python 3.4.0 Programmer:Stephen Mik: Cannot get input variable to make While Loop conditional to work

2014-04-21 Thread Alan Gauld
On 21/04/14 19:12, Stephen Mik wrote: ...I am inputting or trying to input,a Sentry Variable to a While Loop. I want to test out the Main program" While" Loop before I add an inner "While" Loop. The program I have written,when run on the Python 3.4.0 Shell,does not stop for input of the "While"

Re: [Tutor] Beginning Python 3.4.0 Programmer:Stephen Mik: Cannot get input variable to make While Loop conditional to work

2014-04-21 Thread Walter Prins
Hi, On 21 April 2014 19:12, Stephen Mik wrote: > Dear Python Community: > I am new to Python,with only about a month's experience. I am writing > Python 3.4.0 code that apparently isn't doing what it should be doing. > Specifically, I am inputting or trying to input,a Sentry Variable to a Whi

Re: [Tutor] Error

2014-04-21 Thread Alan Gauld
On 21/04/14 19:41, Geocrafter . wrote: im trying to make a board, and is detecting the pieces. Here is my code:http://pastebin.com/L3tQLV2g And here is the error: http://pastebin.com/4FiJmywL Do you knwo hwo to fix it? You are passing in a cell location that results in an index out of range.

[Tutor] Beginning Python 3.4.0 Programmer:Stephen Mik: Cannot get input variable to make While Loop conditional to work

2014-04-21 Thread Stephen Mik
Dear Python Community:     I am new to Python,with only about a month's experience. I am writing Python 3.4.0 code that apparently isn't doing what it should be doing. Specifically, I am inputting or trying to input,a Sentry Variable to a While Loop. I want to test out the Main program" While" L

Re: [Tutor] Recognising Errors

2014-04-21 Thread Saba Usmani
Thanks for the advice and tips. I wasn't taking anything as an insult; I just have a problem with one of the staffs attitude responses. He needs sleep. Alan Gauld has been very helpful- a special thanks to you. Kind regards Saba On 21 Apr 2014, at 18:40, "Danny Yoo" wrote: >> If for some re

[Tutor] Error

2014-04-21 Thread Geocrafter .
im trying to make a board, and is detecting the pieces. Here is my code: http://pastebin.com/L3tQLV2g And here is the error: http://pastebin.com/4FiJmywL Do you knwo hwo to fix it? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscrip

Re: [Tutor] Groups of mutually exclusive options

2014-04-21 Thread Alan Gauld
On 21/04/14 22:05, rail shafigulin wrote: Does anybody know if there is a way to specify groups of mutually exclusive options using argparse module? Sorry, I didn't follow your example. Can you explain what you mean in English? What would be the outcome if you succeeded? What could the user

[Tutor] Groups of mutually exclusive options

2014-04-21 Thread rail shafigulin
Does anybody know if there is a way to specify groups of mutually exclusive options using argparse module? Currently argpase allows to specify mutually exclusive options in the following way (taken from https://docs.python.org/release/3.4.0/library/argparse.html#argparse.ArgumentParser.add_mutuall

Re: [Tutor] which book to read next??

2014-04-21 Thread Albert-Jan Roskam
> From: Alex Kleider >To: tutor@python.org >Sent: Monday, April 21, 2014 9:37 PM >The book I currently keep close at hand as a reference is >Programming in Python 3 by Mark Summerfield (2nd Ed) but I would not >recommend it as an introductory book about Py

Re: [Tutor] which book to read next??

2014-04-21 Thread Alex Kleider
On 2014-04-21 07:13, lee wrote: Hi, I have read the book 'a byte of python' and now I want to read another book. But I just get confused about which one to read next. There is a book list below: 1, pro python 2, python algorithms 3, python cookbook 4, the python standard library by examples which

Re: [Tutor] Recognising Errors

2014-04-21 Thread Danny Yoo
> If for some reason you can't read this code properly as outlook has > formatted it to look messy/cluttered; you do not have to respond. You are missing the point of people point this out. Look at what the email archive thinks of your previous messages: https://mail.python.org/pipermail/tut

Re: [Tutor] which book to read next??

2014-04-21 Thread Joel Goldstick
On Mon, Apr 21, 2014 at 11:41 AM, Alan Gauld wrote: > On 21/04/14 15:13, lee wrote: > >> Hi, I have read the book 'a byte of python' and now I want to read >> another book. But I just get confused about which one to read next. >> There is a book list below: >> 1, pro python >> 2, python algorithms

[Tutor] which book to read next??

2014-04-21 Thread lee
Hi, I have read the book 'a byte of python' and now I want to read another book. But I just get confused about which one to read next. There is a book list below: 1, pro python 2, python algorithms 3, python cookbook 4, the python standard library by examples which one is suitable for me?? Or I ne

Re: [Tutor] Recognising Errors

2014-04-21 Thread Mark Lawrence
On 21/04/2014 07:20, Dave Angel wrote: Saba Usmani Wrote in message: If for some reason you can't read this code properly as outlook has formatted it to look messy/cluttered; you do not have to respond It'd save trouble if you continued in the same thread you started, instead o