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


Groups > comp.lang.python > #44599

Re: to a human - about 2to3

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'output': 0.05; 'concurrently': 0.07; 'modified': 0.07; 'modify': 0.07; 'string': 0.09; '2to3': 0.09; 'append': 0.09; 'ex:': 0.09; 'exit': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'programs.': 0.14; 'changes': 0.15; 'default:': 0.16; 'doctests': 0.16; 'filenames.': 0.16; 'implies': 0.16; 'jennifer': 0.16; 'modified.': 0.16; 'overwriting': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'refactoring': 0.16; 'subject:2to3': 0.16; 'files.': 0.16; 'prevent': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'work,': 0.20; 'written': 0.21; 'input': 0.22; 'this?': 0.23; 'header:User-Agent:1': 0.23; 'specifies': 0.24; 'specify': 0.24; 'url:moin': 0.24; "haven't": 0.24; 'logging': 0.26; 'possibly': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'function': 0.29; "doesn't": 0.30; 'specified': 0.30; 'work.': 0.31; 'program,': 0.31; 'url:wiki': 0.31; 'run': 0.32; 'url:python': 0.33; 'guess': 0.33; "i'd": 0.34; 'could': 0.34; 'problem': 0.35; 'but': 0.35; 'options:': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'skip:- 20': 0.37; 'list': 0.37; 'being': 0.38; 'to:addr:python- list': 0.38; 'files': 0.38; 'skip:- 10': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'read': 0.60; 'conversion': 0.61; 'materials': 0.61; "you're": 0.61; 'back': 0.62; 'show': 0.63; 'teaching': 0.64; 'more': 0.64; 'charset:windows-1252': 0.65; 'haven\x92t': 0.84; 'non-empty.': 0.84; 'received:2': 0.84; 'can\x92t': 0.91; 'processes,': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: to a human - about 2to3
Date Wed, 01 May 2013 18:49:21 +0100
References <3C8565F3435F024E9BB3B36BE06393D80120F355@albyn-exch.albyn-sch.local.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host host-2-98-196-142.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
In-Reply-To <3C8565F3435F024E9BB3B36BE06393D80120F355@albyn-exch.albyn-sch.local.co.uk>
X-Antivirus avast! (VPS 130501-0, 01/05/2013), Outbound message
X-Antivirus-Status Clean
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1220.1367430578.3114.python-list@python.org> (permalink)
Lines 58
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1367430578 news.xs4all.nl 15895 [2001:888:2000:d::a6]:36201
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:44599

Show key headers only | View raw


On 01/05/2013 15:52, Jennifer Butler wrote:
> Hiya
>
> I have trawled around your various pages and haven’t found what I want.
>
> I will start teaching Python to my pupils shortly. I have been looking
> for materials and have gathered a collection of programs. The problem is
> they are written in v2 and I have v3 installed in my classroom. I read
> about the 2to3 conversion program, but I can’t get it to work.
>
> Could you possibly give me a Noddy’s guide to do this?
>
> Thanks in anticipation.
>
> Jennifer J
>

Here's the help output.  I'd guess (as you don't specify exactly what 
doesn't work, 0/10, must try harder :) that you haven't specified -w, 
--write in which case the files don't get modified.

c:\Users\Mark\MyPython>2to3 --help
Usage: 2to3 [options] file|dir ...

Options:
   -h, --help            show this help message and exit
   -d, --doctests_only   Fix up doctests only
   -f FIX, --fix=FIX     Each FIX specifies a transformation; default: all
   -j PROCESSES, --processes=PROCESSES
                         Run 2to3 concurrently
   -x NOFIX, --nofix=NOFIX
                         Prevent a transformation from being run
   -l, --list-fixes      List available transformations
   -p, --print-function  Modify the grammar so that print() is a function
   -v, --verbose         More verbose logging
   --no-diffs            Don't show diffs of the refactoring
   -w, --write           Write back modified files
   -n, --nobackups       Don't write backups for modified files
   -o OUTPUT_DIR, --output-dir=OUTPUT_DIR
                         Put output files in this directory instead of
                         overwriting the input files.  Requires -n.
   -W, --write-unchanged-files
                         Also write files even if no changes were required
                         (useful with --output-dir); implies -w.
   --add-suffix=ADD_SUFFIX
                         Append this string to all output filenames. 
Requires
                         -n if non-empty.  ex: --add-suffix='3' will 
generate
                         .py3 files.


-- 
If you're using GoogleCrap™ please read this 
http://wiki.python.org/moin/GoogleGroupsPython.

Mark Lawrence

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


Thread

Re: to a human - about 2to3 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-01 18:49 +0100

csiph-web