Message7479

Author wayju
Recipients pjenvey, wayju
Date 2012-10-18.00:05:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350518745.95.0.0111032077906.issue1975@psf.upfronthosting.co.za>
In-reply-to
Content
Hi there. Someone suggested that I try os.stat and os.path.exists. 

In python nt.stat.result is returned and os.path.exists is true. In jython it says 'No such file or directory: '\\\\localhost\\temp' for os.stat. and os.path.exists returns false.

See below.

Thanks,

Wayne.


D:\iE2>jython
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:48:36)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_31
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.stat('\\\\localhost\\temp')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory: '\\\\localhost\\temp'
>>> os.listdir('\\\\localhost\\temp')
['aNew Text Document.txt', 'New folder']
>>> os.path.exists('\\\\localhost\\temp')
False
>>> →


D:\iE2>python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.stat('\\\\localhost\\temp')
nt.stat_result(st_mode=16895, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=4096L, st_atime=1349415447L, st_mtime=1349415447L, st_ctime=1349226494L)
>>> os.listdir('\\\\localhost\\temp')
['aNew Text Document.txt', 'New folder']
>>> os.path.exists('\\\\localhost\\temp')
True
>>>
History
Date User Action Args
2012-10-18 00:05:45wayjusetmessageid: <1350518745.95.0.0111032077906.issue1975@psf.upfronthosting.co.za>
2012-10-18 00:05:45wayjusetrecipients: + wayju, pjenvey
2012-10-18 00:05:45wayjulinkissue1975 messages
2012-10-18 00:05:44wayjucreate