[Tutor] How to Split a String
Kent Johnson
kent37 at tds.net
Sat Aug 8 22:28:22 CEST 2009
On Sat, Aug 8, 2009 at 2:33 PM, Paras K.<paras80 at gmail.com> wrote:
> What I am trying to do is find the mail folder for our lotus notes files.
>
> I get it by doing the following:
>
> lotusnotesmaildir = glob.glob('C:\Documents and Settings/pkinariwala/Local
> Settings/Application Data/lotus/notes/data/'+'*mail*/')
>
> That returns: ['C:\\Documents and Settings/pkinariwala/Local
> Settings/Application Data/lotus/notes/data\\mail02\\']
>
> What I am trying to do is split the mail folder, in this case it would be
> mail02, but not all users would have that same mail folder.
See os.path.basename()
Kent
More information about the Tutor
mailing list