Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Custom Module
-
Never mind I figured it out
-
Ok another question.
import ReefRunner ; reload(ReefRunner) gac = raw_input(' ') def graphics(): gbox=''' |-------------------| | | | | | | | | |___________________| ''' if gac == 'graphics.gbox()': print(gbox) else: print('The Text You Entered Is Not Compatible With This Module')
It says gbox is not defined. What do I do?
-
In your code above, the scope of
gbox
is only inside of the functiongraphics()
.If you indent the
if
statement to be inside of the functiongraphics()
, and you callgraphics()
, it should work. -
Thanks! Your super helpful! Are you like a moderator?
-
-
I indented the if statment. But now it won't even print the box. I get no errors
-
You must call
graphics()
to run its code. -
How do I call graphixs()
-
See the last line:
import ReefRunner ; reload(ReefRunner) gac = raw_input('Type "grapics()" or not.: ').lower() def graphics(): gbox=''' |-------------------| | | | | | | | | |___________________| ''' if gac == 'graphics()': print(gbox) else: print('The Text You Entered Is Not Compatible With This Module') graphics() # here we are calling graphics() to run the code of that function
-
Ok thanks. Sorry that was a noob question