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 paul.moore
Recipients 007hengxyx, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-08-02.07:42:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501659735.3.0.676026146837.issue31101@psf.upfronthosting.co.za>
In-reply-to
Content
There are two problems with your code and bug report:

1. By using a single quoted string, some of the backslashes in the path are being interpreted as starting a special character (specifically \t is interpreted as a tab character). You should either double the backslashes to prevent this interpretation (dir_path='d:\\c\\d\\e\\t\\c\\t.xf'), use forward slashes (dir_path='d:/c/d/e/t/c/t.xf') or use a raw string (dir_path=r'd:\c\d\e\t\c\t.xf').

2. You're reporting that Python "auto adds \". It doesn't, it's just that the repr of the string shows a single quoted string with backslashes doubled - that's the standard repr for strings.

So, Python is behaving as expected, and there's no bug here.
History
Date User Action Args
2017-08-02 07:42:15paul.mooresetrecipients: + paul.moore, tim.golden, zach.ware, steve.dower, 007hengxyx
2017-08-02 07:42:15paul.mooresetmessageid: <1501659735.3.0.676026146837.issue31101@psf.upfronthosting.co.za>
2017-08-02 07:42:15paul.moorelinkissue31101 messages
2017-08-02 07:42:14paul.moorecreate