Compile Python Script Using VB.Net

Compile Python Script Using VB.Net

isocam
Collaborator Collaborator
793 Views
1 Reply
Message 1 of 2

Compile Python Script Using VB.Net

isocam
Collaborator
Collaborator

Can anybody help?

 

This might be a silly question but,

 

I have a Python "Addin" that I have created. 

 

I want, if possible, to compile it using VB.Net (for example) so that its contents cannot be viewed/hacked.

 

Can this be done?

 

Many thanks in advance!

 

Darren

0 Likes
794 Views
1 Reply
Reply (1)
Message 2 of 2

BrianEkins
Mentor
Mentor

You can't use any of the .NET technology with Python.  Python does support something similar.  You'll want to search .pyc and .pyo files.  I know pyc files work with Fusion because if you have external py files, they are first compiled into a pyc file and the Fusion uses it.  The main py file that is loaded when your script or add-in is run must be a by file but any modules it references can be pyc and I'm guessing pyo files will also work.

 

As far as the security of either of these files, they aren't very secure if someone wants to hack them.  However the same is true for .NET exe and dll files.  If you're worried about your source code, the most secure will be to write it in C++.  But even then it's possible for someone to hack it.  It's just that it will take someone with a lot more experience and will take them more time.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes