Permalink
Browse files

Python version query

We're starting small with a single line that queries the Python runtime for the major version number.
Since there are incompatible changes between Python 2 and 3, it's useful to know which one is used by Fusion 360.

(It's Python 3)
  • Loading branch information...
Roger-random committed Dec 1, 2017
1 parent c069040 commit c895b985d2cad9ea17d693baf0f05d2e525d5636
Showing with 5 additions and 1 deletion.
  1. +5 −1 HelloF360.py
View
@@ -3,12 +3,16 @@
import adsk.core, adsk.fusion, adsk.cam, traceback
import sys
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
ui.messageBox('Hello script')
version = sys.version_info
ui.messageBox("We're running on Python " + str(version.major), "Version detection")
except:
if ui:

0 comments on commit c895b98

Please sign in to comment.