Convert python2 to python3

An Alfred Workflow


Short Description

Convert the python2 to python3 (Supports Keyword action, MacOS selection, Snippet Expansion, and File Action)

Last Updated

25 May 2019

Compatibility

Yosemite
(10.10)
Mavericks
(10.9)
Mountain Lion
(10.8)
Lion
(10.7)
Snow Leopard
(10.6)
Yes Yes Yes Yes Yes
 

Version

2.0
 

Bundle ID

com.bhishanpdl.convert_py2_py3
 

Author

Categories

For visual demonstration visit github: https://github.com/bhishanpdl/ALFRED/tree/master/Published_Workflows/Alfred_convert_py2_py3

 

In the version 2, some other features are added:

 

1. Using Alfred keyword

=====================

a. cut the text

b. py3

c. this will paste python3

 

2. Using keyboard keys

====================

a. select the text to be converted

b. hit ctrl shift 3  (you need to set up this in workflow)

 

3. Using snippet expansion

====================

a. cut the text

b. type "u;py3" and hit space. This will paste python3 version of text.

 

4. Using File Action

=============

a. Go to Finder and select the file and hit cmd opt \

b. Select To PY3 and hit enter

c. Lets's say you have file a.py  then the file a.py will be changed to python3 and a.py.bak will be created as a backup with the same unchanged python2 format. 

-- NORMAL --