Re: String code required please

2005-10-13 Thread da_hmea98
[EMAIL PROTECTED] wrote: > Does someone have the Python code to pull just the filename and > extension from the end of an absolute path please. > > Thanks in advance ... # Here you go... import os.path # Example path p1 = "C:\\WINDOWS\\system32\\DirectX\\Dinput\\mse.ini" # This will return: 'mse

Re: String code required please

2005-10-13 Thread SPE - Stani's Python Editor
import os fileName = os.path.basename(absolute) base, ext = os.path.splitext(fileName) Stani http://pythonide.stani.be -- http://mail.python.org/mailman/listinfo/python-list

String code required please

2005-10-13 Thread dapgy
Does someone have the Python code to pull just the filename and extension from the end of an absolute path please. Thanks in advance ... -- http://mail.python.org/mailman/listinfo/python-list