Paul McGuire wrote:

4. filename=r[7].split('/')[-1] is not terribly portable.  See if there is a
standard module for parsing filespecs (I'll bet there is).

Indeed there is -- os.path. In particular, os.path.basename() seems to do exactly that snippet is intending, in a much more robust (and readable) fashion.


Jeff Shannon
Technician/Programmer
Credit International

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to