From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dushyant Juneja Subject: org-babel python eval discrepancy Date: Thu, 03 Aug 2017 17:31:12 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11476f9cde36610555dcbfa9" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddJy3-0007DC-Qq for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 13:31:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddJy2-0005Oc-QL for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 13:31:27 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:38299) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddJy2-0005K5-K9 for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 13:31:26 -0400 Received: by mail-wm0-x22a.google.com with SMTP id m85so1219853wma.1 for ; Thu, 03 Aug 2017 10:31:24 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-org list --001a11476f9cde36610555dcbfa9 Content-Type: text/plain; charset="UTF-8" Hi, I have the following code block in my org mode based literate programming notes: #+BEGIN_SRC python print('1+2 > 4 is ', 1+2 > 4) print("What is 3 + 2?", 3 + 2) #+END_SRC When I tangle it and run the script, it gives me expected output as follows: > python notes.py 1+2 > 4 is False What is 3 + 2? 5 However, in buffer evaluation (using =C-c C-c= with cursor on src block) gives me the following output, which seems unexpected: #+BEGIN_SRC python print('1+2 > 4 is ', 1+2 > 4) print("What is 3 + 2?", 3 + 2) #+END_SRC #+RESULTS: : ('1+2 > 4 is ', False) : ('What is 3 + 2?', 5) Any hints what may be going wrong? Dushyant --001a11476f9cde36610555dcbfa9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I have the following code block in = my org mode based literate programming notes:

#+BEGIN_SRC python=C2=A0
print('1+2 > 4 is ', 1+2 > 4)
<= div>print("What is 3 + 2?", 3 + 2)
#+END_SRC

<= /div>
When I tangle it and run the script, it gives me expected output = as follows:

> pyt= hon notes.py=C2=A0
1+2 > 4 is = =C2=A0False
What is 3 + 2? 5

However, in buffer evaluation (using =3DC= -c C-c=3D with cursor on src block) gives me the following output, which se= ems unexpected:

#+BE= GIN_SRC python=C2=A0
print('1= +2 > 4 is ', 1+2 > 4)
p= rint("What is 3 + 2?", 3 + 2)
#+END_SRC

#+RESULTS:
: ('1+2 > 4 is ', False)
: ('What is 3 + 2?', 5)

=
Any hints what may be going wrong?

Dush= yant
--001a11476f9cde36610555dcbfa9--