Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66048
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: Flag control variable |
| Date | 2014-02-12 15:42 +0000 |
| References | (3 earlier) <a06b09f2-b233-46a1-a7d5-048511adb753@googlegroups.com> <mailman.6704.1392162473.18130.python-list@python.org> <68f27949-e613-476b-9227-5a86e4f4df91@googlegroups.com> <mailman.6727.1392182391.18130.python-list@python.org> <9335871e-e4a5-4bdf-92de-72ac7f20a722@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6761.1392219909.18130.python-list@python.org> (permalink) |
On 12/02/2014 15:32, luke.geelen@gmail.com wrote:
> Op woensdag 12 februari 2014 06:23:14 UTC+1 schreef Dave Angel:
>> luke.geelen@gmail.com Wrote in message:
>>
>>> Can I make it that if
>>
>>> C = int(sys.argv[3])
>>
>>> But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
>>
>>>
>>
>>
>>
>> Why do you ask for 'automatically'? You're the programmer, write
>>
>> the test in the code.
>>
>>
>>
>> if len (sys.argv) == 3:
>>
>> sys.argv. append ("0")
>>
>>
>>
>> But of course there are lots of other things you need to check,
>>
>> so consider all of them at the same time.
>>
>>
>>
>> --
>>
>> DaveA
>
> then i keep getting IndexError: list index out of range
> anyway to prevent it and just set the value to 0?
>
Please find a semi-decent tool to use or always follow the instructions
for how to remove the double line spacing when using gg, thanks.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Flag control variable luke.geelen@gmail.com - 2014-02-11 09:29 -0800
Re: Flag control variable Larry Martell <larry.martell@gmail.com> - 2014-02-11 12:44 -0500
Re: Flag control variable Peter Otten <__peter__@web.de> - 2014-02-11 18:46 +0100
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 10:00 -0800
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 10:16 -0800
Re: Flag control variable Tim Chase <python.list@tim.thechases.com> - 2014-02-11 12:32 -0600
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 10:37 -0800
Re: Flag control variable Tim Chase <python.list@tim.thechases.com> - 2014-02-11 12:51 -0600
Re: Flag control variable Peter Otten <__peter__@web.de> - 2014-02-11 19:51 +0100
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 11:01 -0800
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 11:06 -0800
Re: Flag control variable Gary Herron <gary.herron@islandtraining.com> - 2014-02-11 11:26 -0800
Re: Flag control variable Tim Chase <python.list@tim.thechases.com> - 2014-02-11 13:28 -0600
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 11:54 -0800
Re: Flag control variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-11 20:02 +0000
Re: Flag control variable Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-02-11 21:14 +0200
Re: Flag control variable Gary Herron <gary.herron@islandtraining.com> - 2014-02-11 11:20 -0800
Re: Flag control variable Gary Herron <gary.herron@islandtraining.com> - 2014-02-11 10:55 -0800
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 10:59 -0800
Re: Flag control variable Gary Herron <gary.herron@islandtraining.com> - 2014-02-11 11:09 -0800
Re: Flag control variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-11 19:08 +0000
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 11:55 -0800
Re: Flag control variable Gary Herron <gary.herron@islandtraining.com> - 2014-02-11 12:19 -0800
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 13:18 -0800
Re: Flag control variable Gary Herron <gary.herron@islandtraining.com> - 2014-02-11 15:47 -0800
Re: Flag control variable luke.geelen@gmail.com - 2014-02-11 21:09 -0800
Re: Flag control variable Dave Angel <davea@davea.name> - 2014-02-12 00:23 -0500
Re: Flag control variable luke.geelen@gmail.com - 2014-02-12 07:32 -0800
Re: Flag control variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-12 15:42 +0000
Re: Flag control variable Dave Angel <davea@davea.name> - 2014-02-12 13:51 -0500
Re: Flag control variable Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2014-02-12 17:10 +0100
Re: Flag control variable luke.geelen@gmail.com - 2014-02-12 09:15 -0800
Re: Flag control variable Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-12 20:46 -0500
csiph-web