I have some code in python 2.7 and I want to convert it all into python 3.3 code. I know 2to3 can be used but I am not sure exactly how to use it.
Install the following module which adds the 2to3 command directly to entry_points.
pip install 2to3
As it is written on 2to3 docs, to translate an entire project from one directory tree to another, use:
2to3 --output-dir=python3-version/mycode -W -n python2-version/mycode
Can I use the 2to3 file that is in the scripts folder of python 2.7? Because I hear that cmd is needed.
Yes, you can use that one. You have to open up a console(cmd if windows) and execute that file supplying the right arguments as written in the answer.
Still not too sure how to use exactly. Could you provide a few extra details please?
I assume you are on windows environment since you mentioned about cmd. Basically 2to3 is a python script that you need to run through console. If you are having trouble finding 2to3 on path, try "python path/to/script/2to3.py arguments". This expects python to be in the path though. If you are facing further problems try to google "how to execute a python script in windows" or more specifically "how to execute 2to3 in windows"
I seem to be getting an error saying RefactoringTool: Can't open <Directory> No such file or directory