On Dec 13, 7:50 pm, Chris <[EMAIL PROTECTED]> wrote:
> A couple potential optimizations:
>
>
>
> > # create the member variable name.
> > mem_var_name = options.inputfilename
> > mem_var_name = mem_var_name.replace(' ','_')
> > mem_var_name = mem_var_name.replace('.','_')
>
> mem_var_name = options
A couple potential optimizations:
>
> # create the member variable name.
> mem_var_name = options.inputfilename
> mem_var_name = mem_var_name.replace(' ','_')
> mem_var_name = mem_var_name.replace('.','_')
>
mem_var_name = options.inputfilename.replace(' ','_').replace('.','_')
No need to assign
vineeth wrote:
> parser.add_option("-b", "--bytes", dest="bytes")
This is an aside, but if you pass 'type="int"' to add_option, optparse
will automatically convert it to an int, and (I think), give a more
useful error message on failure.
--
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 13, 5:27 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 13 Dec 2007 04:04:59 -0800, vineeth wrote:
> >I have come across a weird problem, I need to determine the amount
> > of bytes read from a file, but couldn't figure it out ,
> >My program does this :
> > __
> >
On Dec 13, 11:04 pm, vineeth <[EMAIL PROTECTED]> wrote:
> Hello all,
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "by
On Dec 13, 5:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> vineeth wrote:
> > Hello all,
> >I have come across a weird problem, I need to determine the amount
> > of bytes read from a file, but couldn't figure it out ,
> >My program does this :
> > __
> >file = open("somefile")
On Dec 13, 11:04 pm, vineeth <[EMAIL PROTECTED]> wrote:
> Hello all,
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "by
On Thu, 13 Dec 2007 04:04:59 -0800, vineeth wrote:
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "bytes read ", len(d
vineeth wrote:
> Hello all,
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "bytes read ", len(data)
> ---
>
> But t
Hello all,
I have come across a weird problem, I need to determine the amount
of bytes read from a file, but couldn't figure it out ,
My program does this :
__
file = open("somefile")
data = file.read()
print "bytes read ", len(data)
---
But the bytes read is not being printed cor
10 matches
Mail list logo