From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: documenting python module examples in orgmode Date: Mon, 9 Dec 2019 09:25:21 -0500 Message-ID: References: <87k175dbr1.fsf@santanas.co.za> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000136aa80599462bef" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38226) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieJyk-0006WY-Av for emacs-orgmode@gnu.org; Mon, 09 Dec 2019 09:25:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieJyi-0008R8-E8 for emacs-orgmode@gnu.org; Mon, 09 Dec 2019 09:25:37 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:34119) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ieJyh-0008NI-Oq for emacs-orgmode@gnu.org; Mon, 09 Dec 2019 09:25:36 -0500 Received: by mail-lj1-x231.google.com with SMTP id m6so15882594ljc.1 for ; Mon, 09 Dec 2019 06:25:35 -0800 (PST) In-Reply-To: <87k175dbr1.fsf@santanas.co.za> 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: Divan Santana Cc: emacs-org list --000000000000136aa80599462bef Content-Type: text/plain; charset="UTF-8" On Mon, Dec 9, 2019, 5:49 AM Divan Santana wrote: > Hi All, > > I'm trying to document python module examples in orgmode. > > I'm sure this is possible, but not quite sure how to do it. > > I'd like to define the python module in one block, and then import it in > another. > Have you looked at the Noweb syntax? It might so what you want (inject code from one Org src block into multiple other src blocks). Here's an example from my notes where I use Noweb syntax with both Python and Nim src blocks: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/raw/master/content-org/notes/string-fns-nim-vs-python.org > --000000000000136aa80599462bef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Dec = 9, 2019, 5:49 AM Divan Santana <= divan@santanas.co.za> wrote:
Hi All,

I'm trying to document python module examples in orgmode.

I'm sure this is possible, but not quite sure how to do it.

I'd like to define the python module in one block, and then import it i= n
another.

Have you looked at the Noweb syntax?

<= /div>
It might so what you want (inject code from one Org = src block into multiple other src blocks).

Here's an example from my notes where I use Noweb sy= ntax with both Python and Nim src blocks:=C2=A0https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/ra= w/master/content-org/notes/string-fns-nim-vs-python.org
--000000000000136aa80599462bef--