From 934e954614e1ab0d391ce4118618c4d0a2432ae7 Mon Sep 17 00:00:00 2001 From: Chris Cunningham Date: Thu, 8 Apr 2021 22:11:38 -0300 Subject: [PATCH] fixes for python 3 support --- CHANGELOG.md | 4 ++++ gradle.properties | 2 +- src/main/kotlin/resources/PythonStrings.kt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4827009..ca7fbb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +## [3.2.4] - 2021-04-8 +### Added +- support Python 3 + ## [3.2.3] - 2021-04-7 ### Added - PyCharm 2021 support diff --git a/gradle.properties b/gradle.properties index bf3d697..28e997e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ pluginGroup = ca.rightsomegoodgames.mayacharm pluginName_ = MayaCharm -pluginVersion = 3.2.3 +pluginVersion = 3.2.4 pluginSinceVersion = 203.0 pluginUntilVersion = 211.* diff --git a/src/main/kotlin/resources/PythonStrings.kt b/src/main/kotlin/resources/PythonStrings.kt index d6bb7fe..043c2d7 100644 --- a/src/main/kotlin/resources/PythonStrings.kt +++ b/src/main/kotlin/resources/PythonStrings.kt @@ -8,7 +8,7 @@ enum class PythonStrings(val message: String) { CLOSE_LOG("import maya.cmds as cmds;cmds.cmdFileOutput(closeAll=True)"), // no clue why the maya.cmds part is needed, but it works and prevents things from getting executing twice - EXECFILE("python(\"execfile(\\\"{0}\\\")\")"), + EXECFILE("python(\"exec(compile(open(\\\"{0}\\\").read(), \\\"{0}\\\", \\\"exec\\\"))\")"), PYSTDERR("# Error: "), PYSTDWRN("# Warning: "), SETTRACE("import pydevd; pydevd.settrace(host=\"{0}\", port={1,number,#}, suspend={2}, stdoutToServer={3}, stderrToServer={3})"),