Skip to content
Discussion options

You must be logged in to vote

The normal import file_name and from file_name import function_name syntax will work as long as:

  1. file_name.py is in the same folder as the file you're adding the import statement to
  2. Both files are listed in __init__.mast
  3. In __init__.mast, file_name.py is listed prior to the the file you're adding the import statement to

Condition 3 is what tripped me up.

If you have code that need to be referenced by multiple other files in folders you want to keep as independent add-ons, it's recommended to put the shared code in an sbslib (or mastlib) that they can reference. Edit: I disagree with this recommendation; see below comment

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@quaris628
Comment options

Comment options

You must be logged in to vote
1 reply
@quaris628
Comment options

Answer selected by quaris628
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants