[issue24494] Can't specify encoding with fileinput and inplace=True

2015-06-24 Thread R. David Murray

R. David Murray added the comment:

I presume this is because openhook could be anything, including something where 
the inplace code couldn't even find the file to rename.  On the other hand, 
Python is a consenting adults language, so we can assume you know what you 
are doing if you specify both.  I think this restriction could be relaxed, and 
am willing to review a patch proposal to so, if it comes with tests :).

--
nosy: +r.david.murray
stage:  - needs patch
type:  - enhancement
versions: +Python 3.6 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24494
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24494] Can't specify encoding with fileinput and inplace=True

2015-06-23 Thread lilydjwg

New submission from lilydjwg:

I want to use fileinput to modify files, but find no way to specify the file 
encoding. I tried to use hook_encoded, but it says FileInput cannot use an 
opening hook in inplace mode.

--
components: Library (Lib)
messages: 245711
nosy: lilydjwg
priority: normal
severity: normal
status: open
title: Can't specify encoding with fileinput and inplace=True
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24494
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com