On Tue, Jun 21, 2011 at 3:37 PM, Joe Amenta <amentajo at msu.edu> wrote: ... > > Yes, 2to3/3to2 does not do anything fancy like that. The tools are purely > concerned with syntax, whereas renaming imports is semantic. The good news > is that this line: > import packaging as _myPackaging > can be replaced by: > import distutils2 as _myPackaging > and code that uses _myPackaging will work. I've attached a fixer that can > go into your lib3to2/fixes folder. You should also edit fix_imports.py and > add the line: > "packaging" : "distutils2", > to the MAPPING dictionary near the top, then you can run 3to2 like this: > 3to2 -fpackaging -fimports files_to_fix.py > (-w option to write changes to the files modified) > Hope this helps, It does, thanks a lot ! Cheers Tarek -- Tarek Ziadé | http://ziade.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4