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 wrote: > On Feb 11, 6:16 am, Matthew Sacks wrote: >> Hi List, >> I am getting an index out of range error when trying to parse with getopt. >> Probably something simple. Any sugges

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 wrote: > On Feb 11, 6:16 am, Matthew Sacks wrote: >> Hi List, >> I am getting an index out of range error when trying to parse with getopt. >&g

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 wrote: > Steve Holden wrote: >> >> Matthew Sacks wrote: >>> >>> Hi List, >>> I am getting

Re: getopt

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

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 wrote: > On Feb 11, 12:12 pm, Matthew Sacks wrote: >> if anyone can have a look at this code and offer suggestions i would >> appreciate it. >> i am forced to use

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=

Re: optparse versus getopt

2009-02-10 Thread Matthew Sacks
: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.or

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 wrote: > Matthew Sacks wrote: >> >> does anyone have any arguments against optparse vs getopt > > I've found that the

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

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

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 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 > idea where to begin.

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 wrote: > On Sat, Jan 31, 2009 at 11:42 PM, mcheun...@hotmail.com > wrote: >> >> Hi all >> what IDE is the best to write python? >> thanks >> from Peter (mcheun...@hotmail

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 wrote: > > >> >> >> >> >> error message: >> Traceback (most recent call last): >> File "", line 1, in >> IndentationError: expected an indented block (, line 39) >> >> code: >> http://pastebin.com/f2f971f91 > > Hi, > > It looks

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: 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 wrote: >> let me re-phrase that question: >> i would like to access t

Re: accessing elements of a tuple

2009-01-30 Thread Matthew Sacks
e list directly using an index? right now I would have to grab the tuple and the use the index of the tuple On Fri, Jan 30, 2009 at 2:20 PM, Matthew Sacks wrote: > i am trying to access elements of a tuple without using the [1:5] notation. > the contents of the tuple are as follows: > (&

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 -- http://m