New submission from Re-ax:

I need to remove a file in python at Windows2012R2, but, os.remove()auto add \ 
in each seq.

code:
#coding=utf-8
import os
dir_path='d:\c\d\e\t\c\t.xf'
os.remove(dir_path)


result:
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit 
(AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>> 

Traceback (most recent call last):
  File "D:\test\script\test.py", line 4, in <module>
    os.remove(dir_path)
WindowsError: [Error 3] The system cannot find the path specified: 
'd:\\c\\d\\e\t\\c\t.xf'
>>>

----------
components: Windows
messages: 299645
nosy: 007hengxyx, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.remove() auto add \ in Windows2012R2
type: resource usage
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31101>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to