emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] setting flags in python src blocks?


From: Yasushi SHOJI
Subject: Re: [O] setting flags in python src blocks?
Date: Thu, 1 Feb 2018 15:11:40 +0900

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



reply via email to

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