Re: [O] org-babel, python, encoding and table

2013-05-29 Thread Roland DONAT
Andreas Röhler andreas.roehler at easy-emacs.de writes: Am 07.05.2013 18:41, schrieb Eric Schulte: #+NAME: test2 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test2 | \303\251 | a|

Re: [O] org-babel, python, encoding and table

2013-05-29 Thread Eric Schulte
To remind and illustrate the problem, here is an example : #+name: pytab-test #+begin_src python :results value :session :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) a #+end_src #+TBLNAME: pytab-test | \303\251 | a| | a| \303\240 | I have

Re: [O] org-babel, python, encoding and table

2013-05-29 Thread Christian Wittern
On 2013-05-29 22:00, Eric Schulte wrote: This does seem to be in the right direction. This is similar to my diagnosis of the non-session case [1]. If the python process prints weird hex character values (e.g., '\xc3\xa0') instead of utf8 characters (e.g., à), then Babel will insert the hex

Re: [O] org-babel, python, encoding and table

2013-05-08 Thread Andreas Röhler
Am 07.05.2013 22:05, schrieb Nick Dokos: Andreas Röhler andreas.roeh...@easy-emacs.de writes: So it's up to choose the Python default interpreter. Unfortunatly (org-babel-do-load-languages 'org-babel-load-languages '((python3 . t))) seems not working. The language is still python

Re: [O] org-babel, python, encoding and table

2013-05-08 Thread Andreas Röhler
Am 07.05.2013 18:41, schrieb Eric Schulte: #+NAME: test2 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test2 | \303\251 | a| | a| \303\240 | Maybe this isn't an execution problem, but is

[O] org-babel, python, encoding and table

2013-05-07 Thread Roland Donat
Hello, My problem is about python code evaluation with org-babel that should give a table containing accented characters. Here is an example : #+NAME: test1 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return b a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test1

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Eric Schulte
#+NAME: test2 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test2 | \303\251 | a| | a| \303\240 | Maybe this isn't an execution problem, but is rather a buffer encoding problem. I

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Andreas Röhler
Am 07.05.2013 18:41, schrieb Eric Schulte: #+NAME: test2 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test2 | \303\251 | a| | a| \303\240 | Maybe this isn't an execution problem, but is

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Eric Schulte
Andreas Röhler andreas.roeh...@easy-emacs.de writes: Am 07.05.2013 18:41, schrieb Eric Schulte: #+NAME: test2 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test2 | \303\251 | a| | a|

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Andreas Röhler
Am 07.05.2013 20:18, schrieb Eric Schulte: Andreas Röhler andreas.roeh...@easy-emacs.de writes: Am 07.05.2013 18:41, schrieb Eric Schulte: #+NAME: test2 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test2 |

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Nick Dokos
Andreas Röhler andreas.roeh...@easy-emacs.de writes: Am 07.05.2013 20:18, schrieb Eric Schulte: Andreas Röhler andreas.roeh...@easy-emacs.de writes: ... Maybe Python simply needs to be convinced to print in utf-8 format? Get the wrong results with a Ipython0.12, but correct with Python3.2.3

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Andreas Röhler
Am 07.05.2013 21:20, schrieb Nick Dokos: Andreas Röhler andreas.roeh...@easy-emacs.de writes: Am 07.05.2013 20:18, schrieb Eric Schulte: Andreas Röhler andreas.roeh...@easy-emacs.de writes: ... Maybe Python simply needs to be convinced to print in utf-8 format? Get the wrong results with a

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Andreas Röhler
[ ... ] But, what is hurting my poor little neurone is the fact that I don't understand why I get the correct result when the evaluation returns a single value and a wrong answer with a table. that's not the case. One from returns a, the other b, which are bound differently. The tuple fails

Re: [O] org-babel, python, encoding and table

2013-05-07 Thread Nick Dokos
Andreas Röhler andreas.roeh...@easy-emacs.de writes: So it's up to choose the Python default interpreter. Unfortunatly (org-babel-do-load-languages 'org-babel-load-languages '((python3 . t))) seems not working. The language is still python (more or less). What you need to do is