Phatshot Posted December 7, 2016 Share Posted December 7, 2016 Hi, I am developing Plug-Ins for Vectorworks 2016. There were no greater issues while running a Python script in Vectorworks on a Windows 7 Machine. When I try to execute the same script on OS X, VW gives the error Quote Traceback (most recent call last): File "Plant.py", line 3, in <module> window = Tk() File "/python3.3/Lib/tkinter/__init__.py", line 1784, in __init__ baseName = os.path.basename(sys.argv[0]) AttributeError: 'module' object has no attribute 'argv' The following code is an extract with causes the error from tkinter import * window = Tk() window.title ('Plant') window.mainloop() Is this a known incompatibility? I consider editing the source of Tkinter but don't know what parameters argv shoud contain in VW on OS X. Thanks for taking your time. Quote Link to comment
Dieter @ DWorks Posted December 8, 2016 Share Posted December 8, 2016 I tried Tkinter before, and it doesn't work with VW. You should avoid it and use the VW dialog stuff, so it's also consistent for the user. Quote Link to comment
JBenghiat Posted December 8, 2016 Share Posted December 8, 2016 TKinter needs a special install work on the Mac: https://www.python.org/download/mac/tcltk/ As Dieter said, though, the way Vectorworks keeps the Python environment alive can make any UI created through Python unstable. You are best using the VW API UI elements. -Josh Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.