Message71132
I just installed Python 3.0b2 in /opt/py3k and tried 2to3 tool:
$ /opt/py3k/bin/2to3 -l
Available transformations for the -f/--fix option:
Traceback (most recent call last):
File "/opt/py3k/bin/2to3", line 5, in <module>
sys.exit(refactor.main("lib2to3/fixes"))
File "/opt/py3k/lib/python3.0/lib2to3/refactor.py", line 69, in main
for fixname in get_all_fix_names(fixer_dir):
File "/opt/py3k/lib/python3.0/lib2to3/refactor.py", line 102, in
get_all_fix_names
names = os.listdir(fixer_dir)
OSError: [Errno 2] No such file or directory: 'lib2to3/fixes'
fixer_dir is the relative directory name "lib2to3/fixes", it should be
an absolute directory. Example (ugly code copied from
RefactoringTool.get_fixers()) to get the full path in refactor.py
(main function):
if not os.path.isabs(fixer_dir):
fixer_pkg = fixer_dir.replace(os.path.sep, ".")
if os.path.altsep:
fixer_pkg = fixer_pkg.replace(os.path.altsep, ".")
mod = __import__(fixer_pkg, {}, {}, ["*"])
fixer_dir = os.path.dirname(mod.__file__) |
|
Date |
User |
Action |
Args |
2008-08-14 15:44:57 | vstinner | set | recipients:
+ vstinner, collinwinter |
2008-08-14 15:44:56 | vstinner | set | messageid: <1218728696.82.0.307782254741.issue3553@psf.upfronthosting.co.za> |
2008-08-14 15:44:55 | vstinner | link | issue3553 messages |
2008-08-14 15:44:54 | vstinner | create | |
|