", and sets global "result"
should be avoided like the plague. Better is to write your functions to
take input arguments, and return results:
result = function("something")
print(result)
One advantage -- one out of many -- is that if you write your functions
l
On 02/11/2013 21:33, juel4...@gmail.com wrote:
Im a newbee at python, and im trying to figure out how to use variables and
setups across modules.
Am I right when i think its smart to keep seperate functions of a program in
seperate modules?
If your code base gets too large to handle in one m
On Sun, Nov 3, 2013 at 8:33 AM, wrote:
> I have a main program module called main.py and in that main.py i have this:
>
> # Sets GPIO's to HIGH = Relays OFF
> try:
> import RPi.GPIO as GPIO
> except RuntimeError:
> Print("Error importing RPi.GPIO!!")
>
> GPIO.setmo
Im a newbee at python, and im trying to figure out how to use variables and
setups across modules.
Am I right when i think its smart to keep seperate functions of a program in
seperate modules?
I have a main program module called main.py and in that main.py i have this:
# Sets GPIO's to HI