How can I find out the size of a file

2007-03-28 Thread Marko . Cain . 23
Hi, How can I find out the size of a file in a disk in python? i try this, but it does not work: size = open(inputFileNameDir + / + file, 'r').size() Thank for any help. -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I find out the size of a file

2007-03-28 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: How can I find out the size of a file in a disk in python? os.path.getsize(filename) -Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I find out the size of a file

2007-03-28 Thread momobear
On Mar 29, 6:09 am, [EMAIL PROTECTED] wrote: Hi, How can I find out the size of a file in a disk in python? i try this, but it does not work: size = open(inputFileNameDir + / + file, 'r').size() Thank for any help. os.stat(filename), see stat manual for detail.(st_size ) -- http