From regebro at gmail.com Sun Sep 2 22:26:03 2012 From: regebro at gmail.com (Lennart Regebro) Date: Sun, 2 Sep 2012 22:26:03 +0200 Subject: [Python-porting] [Python-Dev] Should 2to3 convert Exceptions from In-Reply-To: References: Message-ID: Switched from python-dev to python-porting. On Sun, Sep 2, 2012 at 9:48 PM, anatoly techtonik wrote: > I work offline from remote location about 2000m above the sea level. There > is no internet connection here, so I can not use tracker online. I need a > Python editor here, and I have Spyder checkout. The problem is that my > installation has only Python3. I've tried using 2to3 from setup.py > (attached), but it fails when I execute: > > $ sudo python3 setup.py install > > stderr.log and stdout.log are attached. Is it the intended behavior? > It is also hard find "Porting Python 2 Code to Python 3" article, because it > is not referenced from "Porting to Python 3.x" chapters. 2to3 has not been run on the code that gives you errors. The traceback seems incomplete, and gives no indication of where in the install you get the errors. From the stdout it seems like it just installs the code without using 2to3. The only idea I have at this moment i sto make sure that the build directories are empty. //Lennart From regebro at gmail.com Mon Sep 3 22:59:26 2012 From: regebro at gmail.com (Lennart Regebro) Date: Mon, 3 Sep 2012 22:59:26 +0200 Subject: [Python-porting] [Python-Dev] Should 2to3 convert Exceptions from In-Reply-To: References: Message-ID: On Mon, Sep 3, 2012 at 10:18 PM, anatoly techtonik wrote: > On Sun, Sep 2, 2012 at 11:26 PM, Lennart Regebro wrote: >> Switched from python-dev to python-porting. >> >> On Sun, Sep 2, 2012 at 9:48 PM, anatoly techtonik wrote: >>> I work offline from remote location about 2000m above the sea level. There >>> is no internet connection here, so I can not use tracker online. I need a >>> Python editor here, and I have Spyder checkout. The problem is that my >>> installation has only Python3. I've tried using 2to3 from setup.py >>> (attached), but it fails when I execute: >>> >>> $ sudo python3 setup.py install >>> >>> stderr.log and stdout.log are attached. Is it the intended behavior? >>> It is also hard find "Porting Python 2 Code to Python 3" article, because it >>> is not referenced from "Porting to Python 3.x" chapters. >> >> 2to3 has not been run on the code that gives you errors. The traceback >> seems incomplete, and gives no indication of where in the install you >> get the errors. From the stdout it seems like it just installs the >> code without using 2to3. >> >> The only idea I have at this moment i sto make sure that the build >> directories are empty. > > Removing build/ directory helped indeed. I wonder why it doesn't > remove them automatically? IIRC there is no incremental build support. It doesn't remove them to avoid having to recompile everything everytime you run it. But it compares timestamps, so if you run build, and then add the 2to3 support, it will see that all the py-files are up to date, and not run 2to3 on them. //Lennart