Whats the proper procedure to deal with 2to3 apps
I am writing an application that I intend to distribute as a python 2 and a python 3 app. Im new to python so I not sure about the right way to do things.
What I want is to have 2 source folders and 1 test folder. I want to be able to write the app in python 2, then click a button that runs 2to3 and puts that output in the second source folder, then run the unit tests against the code in the python2 folder and then again on the code in the python3 folder.
it doesn't seem to be possible to tell pycharm's inspections to have the code in the py2src follow the syntax of python2 and the code in the py3src follow the python3. Am I going to have to have two different projects?
anyone have a blog or white paper on the best practices to pull this off?
What I want is to have 2 source folders and 1 test folder. I want to be able to write the app in python 2, then click a button that runs 2to3 and puts that output in the second source folder, then run the unit tests against the code in the python2 folder and then again on the code in the python3 folder.
it doesn't seem to be possible to tell pycharm's inspections to have the code in the py2src follow the syntax of python2 and the code in the py3src follow the python3. Am I going to have to have two different projects?
anyone have a blog or white paper on the best practices to pull this off?
请先登录再写评论。
Please consider writing your application to use same source for Python 2 and Python 3 instead: http://docs.python.org/3/howto/pyporting.html#use-same-source