* python source block weirdness
[not found] <1417096456.12477648.1553971190377.ref@mail.yahoo.com>
@ 2019-03-30 18:39 ` Brad Knotwell
0 siblings, 0 replies; only message in thread
From: Brad Knotwell @ 2019-03-30 18:39 UTC (permalink / raw)
To: Org-mode
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
Good day all--
I've been reading on the mailing list and web about this but it's entirely unclear to me what I need to do to make this work. I have a minimal example below to show what I'm fighting.
The raw/generated documents below show the problem clearly as the second block doesn't run correctly. Looking in the session, it receives an "unexpected indent" error which is unreasonable as I can paste that code into Python's REPL and get an expected result.
Looking around a bit, people were seeing this 4-5 years ago but I haven't been able to find anything since. Relevant version info: 9.2 orgmode, High Sierra OSX, and 2.7.10 Python.
Thx.
--Brad
#+NAME: works#+begin_src python :session broken :exports boths = 3t = 4'result = %d' % (s + t)#+end_src
Working result below:#+RESULTS: works
#+NAME: surprise#+begin_src python :session broken :exports bothtry: 'hi'except: 'there'#+end_src
Surprising result (AKA nothing) below:#+RESULTS: surprise
leads to the following output:
,----| s = 3| t = 4| 'result = %d' % (s + t)`----
Working result below:,----| result = 7`----
,----| try:| 'hi'| except:| 'there'`----
Surprising result (AKA nothing) below:
[-- Attachment #2: Type: text/html, Size: 2147 bytes --]
^ permalink raw reply [flat|nested] only message in thread