[Python-bugs-list] [Bug #129626] Size command broken?

noreply@sourceforge.net noreply@sourceforge.net
Sun, 21 Jan 2001 17:55:48 -0800


Bug #129626, was updated on 2001-Jan-21 17:46
Here is a current snapshot of the bug.

Project: Python
Category: Extension Modules
Status: Closed
Resolution: Invalid
Bug Group: Not a Bug
Priority: 5
Submitted by: nobody
Assigned to : nobody
Summary: Size command broken?

Details: I have been attempting to use the tell() and size() commands to
detect an EOF in a c datafile I am trying to load.
They appear to have the same format...f.tell() and f.size()
tell seems to be working fine, but size gives an  attribut error when I try
to get the file size out of it.  ..as in print f.size()
	I admit I am new to using Python, but I have spent much time trying to get
size to work, and it doesn't...
jrduchek@primary.net

Follow-Ups:

Date: 2001-Jan-21 17:55
By: tim_one

Comment:
Python file objects don't have a .size() method, and I have no idea why you
think they do.  If you want to know the size of a file, use the function
os.path.getsize().  For newbie questions (which are welcome!), try the
Tutor list or the newsgroup comp.lang.python; the bug database is for
bugs.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=129626&group_id=5470