This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stier08
Recipients stier08
Date 2010-06-01.14:40:35
SpamBayes Score 6.9403704e-06
Marked as misclassified No
Message-id <1275403238.02.0.475988525563.issue8869@psf.upfronthosting.co.za>
In-reply-to
Content
execfile() builtin function does not work with UNC paths on Windows platform (Windows 7 x64 has been tested, python 2.6.5)

Since standard IO operations successfully process UNC paths, therefore this behavior of execfile() seems to be a bug.

Code to reproduce (assuming drive c: is present and you have rw permissions)
>>> a=u'\\\\?\\c:\\a.py'
>>> open(a,"w").write("print 'hellow'") # successful write to UNC file 
>>> file(a).read() # successful read from UNC file 
"print 'hellow'"
>>> execfile(a) # ERROR
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '\\\\?\\c:\\a.py'

See description of UNC naming convention
at msdn http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx
at wikipedia http://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention
History
Date User Action Args
2010-06-01 14:40:38stier08setrecipients: + stier08
2010-06-01 14:40:38stier08setmessageid: <1275403238.02.0.475988525563.issue8869@psf.upfronthosting.co.za>
2010-06-01 14:40:36stier08linkissue8869 messages
2010-06-01 14:40:35stier08create