nope, before main you will see "def". This means that everything within the block (in jython the block will be defined with indenting) belongs to "main". So you need to define your functions accordingly to be able to recall specific activities. You can make your life easier by choosing well defined function names and making sure they only do what is expected of them.
Hope that clarifies it a little for you...