jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

Why doesn't the command "import" work anymore??? #211

Closed kalebkim closed 6 years ago

kalebkim commented 6 years ago

Hi, how do you even import in processing 3.3.6? I can't import a tab because I don't even know what a module even is. Please help me!!! My sketches are ruined from imports!!

jdf commented 6 years ago

If you create a separate tab called foo.py containing

def some_function(a):
    return a + 10

then in your main sketch tab you can say

import foo

print(foo.some_function(12))