On 2006-08-16, Hitesh <[EMAIL PROTECTED]> wrote:
>
> Here is a mediocare solution.
>
> def TruncateString(s, Tindex):
>     return string.ljust(s,Tindex){:Tindex]
>
> s = '\\serverName\\C:\\Folder Name1\\FolderName2\\example.exe -u ABC -g
> XYZ'
> Sindex = s.find(".exe")
> Sindex = Tindex +4
> s1 = TruncateString(s, Sindex)

That will fail if the ".exe" isn't found.

-- 
Grant Edwards                   grante             Yow!  Does someone from
                                  at               PEORIA have a SHORTER
                               visi.com            ATTENTION span than me?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to