Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109899

Conversion: execfile --> exec

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Long Yang <long.0.yang@gmail.com>
Newsgroups comp.lang.python
Subject Conversion: execfile --> exec
Date Mon, 13 Jun 2016 21:24:38 +0800
Lines 10
Message-ID <mailman.37.1465824286.2288.python-list@python.org> (permalink)
References <CAKyEaCuhNhRudhV_xMo6WGnePdjFvcZ=R2eDru7JjQUoHgB+tQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de upR+eA6hMsIIkkmX6trLxQ44nVa3LeN4ZJXhJhoFydVw==
Return-Path <long.0.yang@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'received:209.85.223': 0.03; 'python': 0.10; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:{ 20': 0.18; '2.x': 0.22; '3.x': 0.22; 'command': 0.26; 'message-id:@mail.gmail.com': 0.27; 'skip:f 40': 0.27; "skip:' 10": 0.28; 'convert': 0.29; 'skip:- 30': 0.32; 'problem': 0.33; 'info': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'received:209': 0.38; 'skip:- 20': 0.39; 'skip:e 20': 0.39; 'to:addr:python.org': 0.40; 'info)': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=FeaAyb2VUM1RJ1hkBQzurfHyh09NWs8BwvG7yY99444=; b=O0jsj/uxMT1hyBmzGduzqZaKJiN8Q/z6lta+AZL1Ak8LjKS1xrXnTxPgYqUnqG5kSP ibPH9pbXph1alO825CjvnA7oWGXig2quRGCc1fYWK1+ZDThfPNhZAe3W68MJxF9dF9w4 QgZM9H46oNXEZ/NlWWbgwT6vTczq6/g5yOI+L8/cVOsDX2ShrjXa5oIrGwwgD+pjBJ9E 19dGQqGaDsVSiIIi95UDrXJfV+hFkK+bJdoNriQbAay1kUcJuqiC53myuIYQ0UVtRDfa kKYJ6H04PA3Ppe1XIHU/8atnKzXwn5jTw4nZgLQ8RE1+V/WcYolbQDDPD+7PCocypt39 YLKQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=FeaAyb2VUM1RJ1hkBQzurfHyh09NWs8BwvG7yY99444=; b=Kn+EGbIplsV8cTnLM12/k43WHvz/lJfZW7kiDXT/vH8Vtt1pcfPuH6jXXNgxamaGGP bYr98toQsGFbXUfe4mDpQwMoSZE/kudKqhuK+P0L3Lj3mETd7a1wYuH3uo3nVN22F2JY RrV4bYB6NXM11JuR1+N20jsm1wp8vpn91QCYK+QKEf9IRRqOFyOJrShYA9aJ2m3aIAD9 HMtug7mUo0+x9DZ1rZDQSS4gopVC3L5TbZKfgN+pTE3gFQGUzbh1iT7fJpa24L/P6bmW 5eo76Pe3nvTAnEhY/v/e4T0zKBBfGRMLwQebW+LJAdIcC82LMr8ZUfziVUmZJpsAVJGt Mxsw==
X-Gm-Message-State ALyK8tIgyupVusADArIsZXWlvaGhgN4W20It9YFeLzYTStEJ0d5oxkvRQiGgNOzznLk9TVFxj75IPsWxkQkmZQ==
X-Received by 10.107.10.14 with SMTP id u14mr24812624ioi.152.1465824278585; Mon, 13 Jun 2016 06:24:38 -0700 (PDT)
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAKyEaCuhNhRudhV_xMo6WGnePdjFvcZ=R2eDru7JjQUoHgB+tQ@mail.gmail.com>
Xref csiph.com comp.lang.python:109899

Show key headers only | View raw


The python 2.x command is as following:
---------------------------
info = {}
execfile(join('chaco', '__init__.py'), info)
------------------------------

But execfile has been removed in python 3.x.
So my problem is how to convert the above to a 3.x based command?

thanks very much

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Conversion: execfile --> exec Long Yang <long.0.yang@gmail.com> - 2016-06-13 21:24 +0800

csiph-web