newbie question - python blocking on int()?

Michael Davis michael at damaru.com
Mon Jun 10 19:39:55 EDT 2002


Hi,

I'm writing a specialized ftp client. I'm parsing the output of ftp.dir, 
which gives me a string like this (call it str):

-rw-r--r--   1 fred       527 Jun  4 22:58 report.php

and I'm getting the various parts like this:

details = string.split( str )
permissions = details[0]
size = details[3]
name = details[7]
debug( "added remote file size %5d: %s" % (int(size), name) )

This works. But when I replace the 3rd line with this:

size = int( details[3] )

python hangs on that line. Why?

Thanks a lot!

-- 
Michael Davis
Damaru
Custom Programming - Web Development - Database Design
http://www.damaru.com
416-540-1284



More information about the Python-list mailing list