Author josiahcarlson
Recipients
Date 2004-05-20.20:36:24
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=341410

#test setup:
>>> import os
>>> os.environ['TESTING'] = '%TESTING1%'
>>> os.environ['TESTING1'] = '%TESTING2%'
>>> os.environ['TESTING2'] = 'Final\\Path'

#test standard ntpath
>>> import ntpath
>>> ntpath.expanduser('~')
'C:\\Documents and Settings\\jcarlson'
>>> ntpath.expanduser('~billy')
'~billy'
>>> ntpath.expanduser('~billy\\bob')
'~billy\\bob'
>>> ntpath.expanduser('~\\bob')
'C:\\Documents and Settings\\jcarlson\\bob'
>>>
ntpath.expanduser('~billy\\%TESTING%\\%TESTING1%\\%TESTING2%')
'~billy\\%TESTING%\\%TESTING1%\\%TESTING2%'

#test patched ntpath
>>> import ntpath_patched
>>> ntpath_patched.expanduser('~')
'C:Documents and Settings\\jcarlson'
>>> ntpath_patched.expanduser('~billy')
'C:Documents and Settings\\billy'
>>> ntpath_patched.expanduser('~billy\\bob')
'C:Documents and Settings\\billy\\bob'
>>> ntpath_patched.expanduser('~\\bob')
'C:Documents and Settings\\jcarlson\\bob'
>>>
ntpath_patched.expanduser('~billy\\%TESTING%\\%TESTING1%\\%TESTING2%')
'C:Documents and
Settings\\billy\\Final\\Path\\Final\\Path\\Final\\Path'
History
Date User Action Args
2007-08-23 15:37:51adminlinkissue957650 messages
2007-08-23 15:37:51admincreate