Script compiler // python script not executing

Hi,

I have a python script that i created using this example that works when i run through the python editor or call it via the command line. however, when i use the script compiler and install it via package manager on a new machine, it autocompletes on the command line and it doesn’t give me and errors but does not execute.

is there more that needs to be done for the script compiler to work?

Hi Nathan - using the compiler is diferent than what is decribed on that page - the compiler wants just regular scripts, not ones created as commands, though I think those can be made to work - can you post or send me the script?

-Pascal

1 Like

Hey Pascal - is there documentation on the script compiler command for python? Not sure if i missed something more.

Its a simple ETO menu that imports some other python scripts. That was probably going to also be anther question, do imported files become part of the build automatically or do i need to include them as commands in the script compiler?

BELT.py is the main ETO script and it imports the other two.
BELT.zip (4.1 KB)

I have tried a changing the file back to just a script but i must be missing something simple… Thanks for your help!

Hi Nathan - I see problems with external files as well - I’ll see what I can find out. If I put your external functions in the same py file and change the thing to run as just a script,
BELT.py (9.3 KB)

TestBELT.rhp (18.5 KB)

it does work - I’ll include that here in case it helps but I’ll need to find out about support files.

-Pascal

Thanks!
Yep works on my side, does looks like i was missing something simple with the correct call at the end if __name__ == '__main__':TestBELT()

For now i will keep it all in one file.