editorconfig / editorconfig-gedit

EditorConfig plugin for Gedit
http://editorconfig.org
Other
54 stars 13 forks source link

Make the source code Python 3 compatible #3

Closed swansontec closed 10 years ago

swansontec commented 10 years ago

These changes have been tested using both Python 2 and Python 3. The plugin still does not work upon installation, since the .plugin file does not name the "python3" loader.

swansontec commented 10 years ago

I have modified the install script to select the correct python version based on the gedit version. I have tested this on both Arch Linux and an Ubuntu 12.04 VM, and it works correctly both ways. I am not sure if sed is the right approach, but I couldn't think of a better way without seriously reorganizing the repository.

treyhunner commented 10 years ago

@swansontec awesome!

I made some code style critiques. The plugin was kind of a hack before so I don't have strong opinions about fixing those before merging.

swansontec commented 10 years ago

I believe I have fixed everything you wanted, except for the else ... if, which should stay the way it is. I have tested the new plugin on all three supported platforms (gedit 2.x, 3.x, and 3.8), and it works correctly.

treyhunner commented 10 years ago

I'm :+1: for merging if it seems to work.

If you have access to merge, go for it.

swansontec commented 10 years ago

Ok, merged!