GioPet Posted October 16, 2018 Share Posted October 16, 2018 (edited) Hello, I have been working on a few Python Scripts that use third party libraries - for example BeautifulSoup4. I intend to Encryption this script into a vsm plugin so that the external libraries are bound to it and can be used on other installations of Vectorworks. I realised that the Encryption/Obfuscation method through Vectorworks is not able to bind the external packages into the vsm file: I've included the path to these libraries in the Script Options and I am using the steps indicated by Vlado in this post for the related xml file. <?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- This file defines how the corresponding script plug-in should be packaged--><Plugin> <Package> <File>code/__init__.py</File> <File>bS4/</File> <File>bS4/__init__.py</File> <File>bS4/.py</File> <File>bS4/diagnose.py</File> <File>bS4/element.py</File> <File>bS4/testing.py</File> <File>bS4/builder/__init__.py</File> <File>bS4/builder/_html5lib.py</File> <File>bS4/builder/_htmlparser.py</File> <File>bS4/builder/_lxml.py</File> </Package> </Plugin> Can any one advise on how to resolve this? Thank you in advance. Giovanni Edited October 16, 2018 by GioPet wrong image Quote Link to comment
PatW Posted October 24, 2018 Share Posted October 24, 2018 (edited) Hi Giovanni, normaly you don't need to declare any file that should go into the vsm. When I remember correct theres also a folder tag that you can use <Folder>MyPythonPackage</Folder>. I never tried to include an external lib into a vsm but you could look for the lib as usual package with py files and include these instead. Edited October 24, 2018 by PatW Quote Link to comment
GioPet Posted October 25, 2018 Author Share Posted October 25, 2018 Hi Pat, thank you for your reply. I have tried using the <Folder>MyPythonPackage</Folder> but when I run the encrypted vsm in a Vectorworks installation that has no bs4 library installed, I get the following: So this is not working... In my understanding, when you say 'look for the lib as usual package with py files and include these instead' isn't that done by adding all the py files of the library in the xml Package? in this way: <File>bS4/</File> <File>bS4/__init__.py</File> <File>bS4/.py</File> <File>bS4/diagnose.py</File> <File>bS4/element.py</File> <File>bS4/testing.py</File> <File>bS4/builder/__init__.py</File> <File>bS4/builder/_html5lib.py</File> <File>bS4/builder/_htmlparser.py</File> <File>bS4/builder/_lxml.py</File> thanks for your advice. Giovanni 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.