From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 32914A0507; Fri, 1 Apr 2022 23:47:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C849A40E03; Fri, 1 Apr 2022 23:47:47 +0200 (CEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id 72E4F4067E for ; Fri, 1 Apr 2022 23:47:47 +0200 (CEST) Received: by mail-lf1-f50.google.com with SMTP id k21so7254457lfe.4 for ; Fri, 01 Apr 2022 14:47:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eOhOEFiRo2w4B5WfFyJhzJO5itrXwZ3xCnTBQogV+hs=; b=R7HV8dogCFdnK8Vb2Ll6Y6ofk+o/N2rtxMQD1SBj/ky1fooWtdSKG7JCN7bQbDpcUe AmjaO8Bn3vcF6PkLHFVCgKmEpJUXEDVY//adXBi/M+BNfipat86ZJ8DkH82DilQTxMvO 43CxIZoTKSYso1hQN+h6Bs4F/2CagwGF1FWFD51/cJVoCqBG+Ln1k8mtHMlh2mpwJ3PY OGqkb6YQr3pUc3GKkRU2GUhBG5AUgnFjlUiJlsJURR3uAZaNzCa83tRb6cDWfSBwhMGF NLsxUbyx9EUD9tALMxSnrjbZpfvqL52sou7yot+49Z9PpSM/vbMtbv0vQd25FUb1D3kl ylFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eOhOEFiRo2w4B5WfFyJhzJO5itrXwZ3xCnTBQogV+hs=; b=xi1L+uHPKmAURWJlB6c46//dJc7J2mpO7e3ie2SrS6lhWyAkTENUrWTnc9vN8YLRY5 1kfn3TJulme+K6PAbRH4ORwzD19R6/ZPZ4sH0Z0jIIfWyQmazBplyzTGbfXlgPwIcUDv PV0b9J/D9BA6c68vfnKUZnJ8ZuLOe1melXg9bbJVOk8pHGqEDtb2weOqh/VDUEFxxp3Q JOZeq5lbbzeEybfKyz5oRMqEAt/TmBpvVzGxNKZ9TNpMwDCW2Pe8o/toBm822QQM+tA+ QRMD4ExNDncb+ejILYzqf7+sRHsw8pdzKHMA2xoq5BVVq3AlEBt56S9k+F8i64qhaDDD G43g== X-Gm-Message-State: AOAM530lCcq4r6bA0cfm2lfOGdDeBkGAwGNgNiHqvGhT08NTPHeJaBsn lzfBx1iib9Kcf4rWr3jUwMc= X-Google-Smtp-Source: ABdhPJyMJ4TFa3nEF4xNR0dCXApnTtrL6tF43fv2EsUBiHilFIdZN4YMXp2fGk9RrduyI8XR3MbbMQ== X-Received: by 2002:ac2:4c51:0:b0:44a:34b8:fd72 with SMTP id o17-20020ac24c51000000b0044a34b8fd72mr14875271lfk.360.1648849666807; Fri, 01 Apr 2022 14:47:46 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id c20-20020a196554000000b0044a1181c527sm351759lfj.9.2022.04.01.14.47.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 14:47:46 -0700 (PDT) Date: Sat, 2 Apr 2022 00:47:45 +0300 From: Dmitry Kozlyuk To: Bruce Richardson Cc: dev@dpdk.org, Vipin Varghese Subject: Re: [PATCH 3/3] doc: rewrite shell scripts in Python Message-ID: <20220402004745.7b9d34dc@sovereign> In-Reply-To: References: <20220331212830.708912-1-dmitry.kozliuk@gmail.com> <20220331212830.708912-4-dmitry.kozliuk@gmail.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 2022-04-01 17:31 (UTC+0100), Bruce Richardson: > On Fri, Apr 01, 2022 at 12:28:30AM +0300, Dmitry Kozlyuk wrote: [...] > > + if is_source or name == 'meson.meson.build': > > duplicate "meson." Thanks! > > + path = os.path.join(root, name) > > + if is_source: > > + sources.append(path) > > + print(path , end=' ', file=dep) > > + > > +sys.stdout = open(api_examples, 'w') > > While this is a literal translation of what is done in the .sh file, I > wonder if, for consistency, in the python versions we should always either > use stdout redirection or always use "file=" option to printing. Right now > we have a mix of both. I was wondering about this too. Will change to "file=" (see also below) because explicit is better. > > +print('/**') > > +print('@page examples DPDK Example Programs') > > +print() > > Is this additional print done deliberately for clarity vs just putting '\n' > on previous line? Yes. I think '''-string will be cleaner, especially with "file=".