|
From: | John Kitchin |
Subject: | Re: [O] setting flags in python src blocks? |
Date: | Wed, 31 Jan 2018 22:23:32 -0800 |
Hi,
On Thu, Feb 1, 2018 at 8:47 AM, John Kitchin <address@hidden> wrote:
> Is it possible to set command line flags for an executable in src blocks? I
> was thinking of something like this
>
> #+BEGIN_SRC python :flags --some_flag=True :tangle test.py
> import app
>
> print(app.FLAGS.some_flag) # -> True
> #+END_SRC
ob-python doesn't suport :flags nor :cmdline, but you can set interpreter
with :python. So, you can do
#+begin_src python :python "python --some_flag=True"
to pass parameter to the interpreter.
--
yashi
[Prev in Thread] | Current Thread | [Next in Thread] |