Re: [Tutor] how to send command line args to py script

2007-03-11 Thread shawn bright
OK, will do. Looks like my future will involve more of this kind of thing. thanks shawn On 3/11/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > On Sun, Mar 11, 2007 at 09:07:41PM -0500, shawn bright wrote: > > Well, for your first response, its great, > > thanks a lot. > > shawn > > And, when you n

Re: [Tutor] how to send command line args to py script

2007-03-11 Thread Dave Kuhlman
On Sun, Mar 11, 2007 at 09:07:41PM -0500, shawn bright wrote: > Well, for your first response, its great, > thanks a lot. > shawn And, when you needs to process command line arguments and flags and options become more complicated, be sure to look at modules getopt and optparse in the standard libr

Re: [Tutor] how to send command line args to py script

2007-03-11 Thread shawn bright
Well, for your first response, its great, thanks a lot. shawn On 3/11/07, Gordon <[EMAIL PROTECTED]> wrote: > This is my first time replying to the list, so excuse me if this goes > out wrong. > > Anyhow, you're looking for sys.agrv. sys.agrv is a list of the > arguments, with sys.agrv[0] being t

Re: [Tutor] how to send command line args to py script

2007-03-11 Thread Gordon
This is my first time replying to the list, so excuse me if this goes out wrong. Anyhow, you're looking for sys.agrv. sys.agrv is a list of the arguments, with sys.agrv[0] being the script name. Code: ## import sys #sys.argv is part of the sys module def add_two_numbers(a, b): x =

[Tutor] how to send command line args to py script

2007-03-11 Thread shawn bright
lo there all, i was wondering how to make a python script accept command line arguments. i mean, i have used python scripts from the command line in linux and passed something to it and it knows what to do. like in a function, if i want to do something like this def add_two_numbers(a, b): x