Re: getopt index out of range

2009-02-11 Thread Matthew Sacks
because the traceback says the index is 0 and there's only one line with a 0 in it! Indeed. Thank you. On Wed, Feb 11, 2009 at 7:11 AM, MRAB goo...@mrabarnett.plus.com wrote: Steve Holden wrote: Matthew Sacks wrote: Hi List, I am getting an index out of range error when trying to parse

Re: getopt index out of range

2009-02-11 Thread Matthew Sacks
Perhaps you can give me a call privately and I will explain it to you. Regards, Matthew On Wed, Feb 11, 2009 at 1:48 PM, John Machin sjmac...@lexicon.net wrote: On Feb 11, 6:16 am, Matthew Sacks ntw...@gmail.com wrote: Hi List, I am getting an index out of range error when trying to parse

Re: getopt index out of range

2009-02-11 Thread Matthew Sacks
Keep your threadiquette to yourself. On Wed, Feb 11, 2009 at 1:48 PM, John Machin sjmac...@lexicon.net wrote: On Feb 11, 6:16 am, Matthew Sacks ntw...@gmail.com wrote: Hi List, I am getting an index out of range error when trying to parse with getopt. Probably something simple. Any

getopt index out of range

2009-02-10 Thread Matthew Sacks
Hi List, I am getting an index out of range error when trying to parse with getopt. Probably something simple. Any suggestions are appreciated optlist, args = getopt.getopt(sys.argv[1:], 'h', ['connectPassword=', 'adminServerURL=', 'action=', 'targets=', 'appDir=']) #Assign Opts connectPassword

optparse versus getopt

2009-02-10 Thread Matthew Sacks
does anyone have any arguments against optparse vs getopt -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse versus getopt

2009-02-10 Thread Matthew Sacks
it seems as if optparse isn't in my standard library. is there a way to add a lib like ruby gems? On Tue, Feb 10, 2009 at 1:38 PM, Tim Chase python.l...@tim.thechases.com wrote: Matthew Sacks wrote: does anyone have any arguments against optparse vs getopt I've found that the optparse module

Re: optparse versus getopt

2009-02-10 Thread Matthew Sacks
: On 2009-02-10 15:42, Matthew Sacks wrote: it seems as if optparse isn't in my standard library. How did you install your Python? It has been part of the standard library for a very long time. is there a way to add a lib like ruby gems? http://docs.python.org/install/index.html But optparse

getopt

2009-02-10 Thread Matthew Sacks
if anyone can have a look at this code and offer suggestions i would appreciate it. i am forced to use getopt, so i cant use something good like optparse passedArgs = sys.argv[1:] optlist, args = getopt.getopt(str(passedArgs), [connectPassword=, adminServerURL=, action=, targets=, appDir=]) for

Re: getopt

2009-02-10 Thread Matthew Sacks
The documentation leaves lack for want, especially the examples. On Tue, Feb 10, 2009 at 5:25 PM, John Machin sjmac...@lexicon.net wrote: On Feb 11, 12:12 pm, Matthew Sacks ntw...@gmail.com wrote: if anyone can have a look at this code and offer suggestions i would appreciate it. i am forced

Re: getopt

2009-02-10 Thread Matthew Sacks
. I appreciate the response. M On Tue, Feb 10, 2009 at 10:36 PM, John Machin sjmac...@lexicon.net wrote: On Feb 11, 4:36 pm, Matthew Sacks ntw...@gmail.com wrote: The documentation leaves lack for want, especially the examples. You had two problems: (1) str(passedArgs): The docs make

Re: simple web app, where to start

2009-02-06 Thread Matthew Sacks
have a loo at the django framework http://www.djangoproject.com/ On Fri, Feb 6, 2009 at 8:16 PM, Vincent Davis vinc...@vincentdavis.net wrote: I have a simple script that takes a few input values and returns a csv file and a few stats. If I wanted to host this on the web how would I. I have no

Re: what IDE is the best to write python?

2009-02-01 Thread Matthew Sacks
Wingware IDE is pretty good. It's not free though. http://www.wingware.com/ On Sun, Feb 1, 2009 at 12:14 AM, Stephen Hansen apt.shan...@gmail.com wrote: On Sat, Jan 31, 2009 at 11:42 PM, mcheun...@hotmail.com mcheun...@hotmail.com wrote: Hi all what IDE is the best to write python? thanks

accessing elements of a tuple

2009-01-30 Thread Matthew Sacks
i am trying to access elements of a tuple without using the [1:5] notation. the contents of the tuple are as follows: ('--datasourcename', 'DB') I want to access everything in the second argument, but i am not sure how to go about this without converting to a string. thanks in advance --

Re: accessing elements of a tuple

2009-01-30 Thread Matthew Sacks
have to grab the tuple and the use the index of the tuple On Fri, Jan 30, 2009 at 2:20 PM, Matthew Sacks ntw...@gmail.com wrote: i am trying to access elements of a tuple without using the [1:5] notation. the contents of the tuple are as follows: ('--datasourcename', 'DB') I want to access

Re: accessing elements of a tuple

2009-01-30 Thread Matthew Sacks
First of all, list is a reserved word. Don't use it as a variable name. I was using it as an example in this case. mylist[0][1] if I understand the question. This works. Thank you. On Fri, Jan 30, 2009 at 2:39 PM, Tim Chase python.l...@tim.thechases.com wrote: let me re-phrase that question:

problem with program - debugging leading nowhere

2009-01-30 Thread Matthew Sacks
i am trying to figure out what has gone wrong in my python program. it is complaining that there is an indendation error. should be simple enough but im stuck on this one. if anyone can help unjolt me it would be appreciated. thank you error message: Traceback (most recent call last): File

Re: problem with program - debugging leading nowhere

2009-01-30 Thread Matthew Sacks
this works. thanks! On Fri, Jan 30, 2009 at 3:59 PM, Jervis Whitley jervi...@gmail.com wrote: error message: Traceback (most recent call last): File string, line 1, in string IndentationError: expected an indented block (string, line 39) code: http://pastebin.com/f2f971f91 Hi,