Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #89074
| Date | 2015-04-17 10:57 -0400 |
|---|---|
| From | Dave Angel <d@davea.name> |
| Subject | Re: Converting text file to different encoding. |
| References | <6bddf2c0-b0c3-456d-a699-d6c921e6fc73@googlegroups.com> <55311D59.90102@davea.name> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.372.1429282649.12925.python-list@python.org> (permalink) |
On 04/17/2015 10:48 AM, Dave Angel wrote:
> On 04/17/2015 09:19 AM, subhabrata.banerji@gmail.com wrote:
>> >>> target = open("target", "w")
>
> It's not usually a good idea to use the same variable for both the file
> name and the opened file object. What if you need later to print the
> name, as in an error message?
Oops, my error. Somehow my brain didn't notice the quote marks, until I
reread my own message online.
--
DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Converting text file to different encoding. subhabrata.banerji@gmail.com - 2015-04-17 06:19 -0700
Re: Converting text file to different encoding. Rustom Mody <rustompmody@gmail.com> - 2015-04-17 06:31 -0700
Re: Converting text file to different encoding. subhabrata.banerji@gmail.com - 2015-04-17 06:51 -0700
Re: Converting text file to different encoding. Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-04-17 15:05 +0100
Re: Converting text file to different encoding. subhabrata.banerji@gmail.com - 2015-04-17 07:26 -0700
Re: Converting text file to different encoding. Chris Angelico <rosuav@gmail.com> - 2015-04-18 00:41 +1000
Re: Converting text file to different encoding. Marko Rauhamaa <marko@pacujo.net> - 2015-04-17 17:51 +0300
Re: Converting text file to different encoding. Peter Otten <__peter__@web.de> - 2015-04-17 17:06 +0200
Re: Converting text file to different encoding. Dave Angel <davea@davea.name> - 2015-04-17 10:48 -0400
Re: Converting text file to different encoding. Dave Angel <d@davea.name> - 2015-04-17 10:57 -0400
csiph-web