From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Welle Subject: Re: Babel: Store script in external file Date: Mon, 16 Dec 2019 11:09:54 +0100 Message-ID: <87bls8vax9.fsf@luisa.c0t0d0s0.de> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:47646) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ignKB-0004qY-ES for emacs-orgmode@gnu.org; Mon, 16 Dec 2019 05:10:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ignKA-0006Po-Ga for emacs-orgmode@gnu.org; Mon, 16 Dec 2019 05:09:59 -0500 Received: from mout.gmx.net ([212.227.17.22]:53005) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ignKA-0006K8-39 for emacs-orgmode@gnu.org; Mon, 16 Dec 2019 05:09:58 -0500 Received: from stella.c0t0d0s0.de ([194.95.66.1]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MmUHp-1hygzq24Ez-00iRP6 for ; Mon, 16 Dec 2019 11:09:55 +0100 Received: from Stella (stella.c0t0d0s0.de [192.168.42.1]) by stella.c0t0d0s0.de (Postfix) with ESMTP id E37DC1812E9 for ; Mon, 16 Dec 2019 11:09:54 +0100 (CET) In-Reply-To: (Nathan Neff's message of "Sun, 15 Dec 2019 19:21:36 -0600") 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-orgmode@gnu.org Hello, Nathan Neff writes: > Hello all, > > I think I'm missing something basic: I'd like to have something like this: > > #+begin_src python > #+filename: foo.py > > Instead of storing my Python code in the current org file, I would like > Babel to read foo.py and execute it, as if it was inside the .org file. > > The foo.py mentioned above is fairly large, and I would like the code > to be stored in a different file than my .org file, for brevity. > > Any ideas? I feel like I'm missing something obvious. either put some Python code into your Python src block that executes your external script. Or use a shell|elisp|whatever src block that executes your script. Regards hmw