Brett Cannon <br...@python.org> added the comment:

On Tue, Mar 24, 2009 at 09:24, Jean-Michel Fauth <rep...@bugs.python.org>wrote:

>
> Jean-Michel Fauth <wxjmfa...@gmail.com> added the comment:
>
> I'm glad to have discovered this topic. I bumped into something similar
> when I toyed with an interactive interpreter.
>
> from code import InteractiveInterpreter
>
> ii = InteractiveInterpreter()
> source = ...
> ii.runsource(source)
>
> What should be the encoding and/or the type (str, bytes) of the "source"
> string?

Off the top of my head it should be UTF-8. Otherwise it can probably be
bytes as long as it has universal newlines.

----------
Added file: http://bugs.python.org/file13411/unnamed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4626>
_______________________________________
<br><br><div class="gmail_quote">On Tue, Mar 24, 2009 at 09:24, Jean-Michel 
Fauth <span dir="ltr">&lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;</span> 
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid 
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
Jean-Michel Fauth &lt;<a 
href="mailto:wxjmfa...@gmail.com";>wxjmfa...@gmail.com</a>&gt; added the 
comment:<br>
<br>
I&#39;m glad to have discovered this topic. I bumped into something similar<br>
when I toyed with an interactive interpreter.<br>
<br>
from code import InteractiveInterpreter<br>
<br>
ii = InteractiveInterpreter()<br>
source = ...<br>
ii.runsource(source)<br>
<br>
What should be the encoding and/or the type (str, bytes) of the 
&quot;source&quot;<br>
string?</blockquote><div><br>Off the top of my head it should be UTF-8. 
Otherwise it can probably be bytes as long as it has universal 
newlines.<br></div></div><br>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to