Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17955 > unrolled thread
| Started by | Lie Ryan <lie.1296@gmail.com> |
|---|---|
| First post | 2011-12-26 20:36 +1100 |
| Last post | 2011-12-26 20:36 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Backslash Escapes Lie Ryan <lie.1296@gmail.com> - 2011-12-26 20:36 +1100
| From | Lie Ryan <lie.1296@gmail.com> |
|---|---|
| Date | 2011-12-26 20:36 +1100 |
| Subject | Re: Backslash Escapes |
| Message-ID | <mailman.4100.1324892219.27778.python-list@python.org> |
On 12/26/2011 12:04 PM, Felipe O wrote: > Hi all, > Whenever I take any input (raw_input, of course!) or I read from a > file, etc., any backslashes get escaped automatically. Python never escapes backslashes when reading from raw_input or files. Python only ever escapes backslashes when displaying data on the interactive shell since the interactive shell uses __repr__ by default. > Is there any > elegant way of parsing the backslashes as though they were written in > a python string. The best I have so far right now goes like this: You shouldn't ever need to unless your file are backslash-escaped.
Back to top | Article view | comp.lang.python
csiph-web