From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: Re: setting flags in python src blocks? Date: Thu, 1 Feb 2018 15:11:40 +0900 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eh864-0006oS-71 for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 01:11:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eh863-0000k5-4F for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 01:11:44 -0500 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:37617) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eh862-0000js-RZ for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 01:11:43 -0500 Received: by mail-lf0-x231.google.com with SMTP id 63so24388006lfv.4 for ; Wed, 31 Jan 2018 22:11:42 -0800 (PST) In-Reply-To: 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: John Kitchin Cc: org-mode-email Hi, On Thu, Feb 1, 2018 at 8:47 AM, John Kitchin 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