newbie help

andrea kerny404 at gmail.com
Wed Mar 23 20:58:25 EST 2005


ashtonn at gmail.com wrote:

> I want to pass and index number  and a file name from the command line.
> This index number corresponds to a buffer. I need to maintain 2 such
> buffers for my test.
>
>  
>
Passing options is very easy, just import sys and you can find your 
options in sys.argv.
To do something more complicated you should use getopt, or even more 
complicated optparse.

> In C you would do someting like this
> unsigned char buf1[512];
>
> In python is this as simple as?
> buf 1 = 512
> buf 2 = 512
> And how do i keep track of buf1 and buf2
> Thanks.
>
> Thanks.
>  
>
I think I didn't understand the question, can't you just use a list??



More information about the Python-list mailing list