[Tutor] could please convert this code to 3.X by using 2to3
Mark Lawrence
breamoreboy at yahoo.co.uk
Tue Feb 18 22:35:18 CET 2014
On 18/02/2014 20:57, S Tareq wrote:
> sorry, is there any other way to convert the coding
>
Use an editor?
Or try this:-
c:\Users\Mark>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.
And please *DON'T* top post.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
More information about the Tutor
mailing list