emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] babel - python question


From: Rustom Mody
Subject: [O] babel - python question
Date: Fri, 5 Jul 2013 18:14:28 +0530

[Complete babel noob here]

Following the babel doc http://orgmode.org/worg/org-contrib/babel/intro.html#library-of-babel

I wrote this

* Head
#+name: ppp :results value
#+begin_src python
import time
print("Hello, today's date is %s" % time.ctime())
print('Two plus two is')
return 2 + 2
#+end_src

Hit C-c C-c

and got a new block

#+RESULTS:
: 4


I am mystified!
In python a top level return gives a syntax error.
Here it works. Is some secret function being created?

Also the results changed to output does not change the behavior

reply via email to

[Prev in Thread] Current Thread [Next in Thread]