From 7e20b46e9872bcc54a1b4f6918c248219447fa80 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 9 Aug 2014 16:56:18 +0300 Subject: [PATCH] Re: [PATCH] doc/prerst2man.py: swap execfile with an exec call --- b8/86aaa8dded515847ebc8b0431fc0fe4dab0c4d | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 b8/86aaa8dded515847ebc8b0431fc0fe4dab0c4d diff --git a/b8/86aaa8dded515847ebc8b0431fc0fe4dab0c4d b/b8/86aaa8dded515847ebc8b0431fc0fe4dab0c4d new file mode 100644 index 000000000..ce70ac146 --- /dev/null +++ b/b8/86aaa8dded515847ebc8b0431fc0fe4dab0c4d @@ -0,0 +1,96 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 9B65C431FB6 + for ; Sat, 9 Aug 2014 06:56:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id SeeTJlHUxP8s for ; + Sat, 9 Aug 2014 06:56:33 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 8B255431FAE + for ; Sat, 9 Aug 2014 06:56:33 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 06B98100051; + Sat, 9 Aug 2014 16:56:19 +0300 (EEST) +From: Tomi Ollila +To: Gaute Hope , notmuch@notmuchmail.org +Subject: Re: [PATCH] doc/prerst2man.py: swap execfile with an exec call +In-Reply-To: <1407591591-25203-1-git-send-email-eg@gaute.vetsj.com> +References: <1407591591-25203-1-git-send-email-eg@gaute.vetsj.com> +User-Agent: Notmuch/0.18.1+25~gdaf4b6f (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 09 Aug 2014 13:56:41 -0000 + +On Sat, Aug 09 2014, Gaute Hope wrote: + +> at some point in python 3.* execfile was removed. per +> http://stackoverflow.com/questions/6357361/alternative-to-execfile-in-python-3-2 +> the execefile has been replaced in the same manner as python 2to3 helper +> script would do. +> +> tested on python 3.4.1 and 2.7.8. +> --- + +Thanks for the patch -- I have use the idea elsewhere with ipython :D + +Trevor has a patch series which takes care e.g. of this: + +id:"8cc9dd580ad672527e12f43706f9803b2c8e99d8.1405220724.git.wking@tremily.us" + +http://article.gmane.org/gmane.mail.notmuch.general/18661 + + +Tomi + + +> doc/prerst2man.py | 3 ++- +> 1 file changed, 2 insertions(+), 1 deletion(-) +> +> diff --git a/doc/prerst2man.py b/doc/prerst2man.py +> index 437dea9..3f85c0c 100644 +> --- a/doc/prerst2man.py +> +++ b/doc/prerst2man.py +> @@ -10,7 +10,8 @@ outdir = argv[2] +> if not isdir(outdir): +> makedirs(outdir, 0o755) +> +> -execfile(sourcedir + "/conf.py") +> +filename = sourcedir + "/conf.py" +> +exec(compile(open(filename, "rb").read(), filename, 'exec')) +> +> +> def header(file, startdocname, command, description, authors, section): +> -- +> 2.0.3 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2