We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello. I'm typing code in other tab, from processing, however a need to import the functions for me to execute. When I typing "import", the processing return error.
Tab 1 (main) import tab2
Tab 2
def foo(): print("Hello world! =)")
How I can to do this?
Answers
Ignore me. I apparently don't know anything about Python mode.
https://Forum.Processing.org/two/discussion/15473/readme-how-to-format-code-and-text
import
them into our main ".pyde" tab before they become available.def loadStuff():
class Stuff:
HOUR = 60 * 60 * 1000
My_Other_Stuff.py
import
everything from "My_Other_Stuff.py" tab into the ".pyde" main tab, you can use the following:from My_Other_Stuff import *
from My_Other_Stuff import loadStuff, HOUR
My_Main_Tab.pyde:
Thank you GoToLoop for your answer about my question and about the format text on post.