emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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

only message in thread, other threads:[~2019-03-30 18:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1417096456.12477648.1553971190377.ref@mail.yahoo.com>
2019-03-30 18:39 ` python source block weirdness Brad Knotwell

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).