Re: [Tutor] importing my module imports only one function

2014-01-30 Thread Dave Angel
Ian D Wrote in message: > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > 1) you forgot to escape the backslashes in your module path. Either use forward sl

Re: [Tutor] importing my module imports only one function

2014-01-30 Thread Alan Gauld
On 30/01/14 15:43, Ian D wrote: if I create a module called "modtest.py" like this: import turtle def square(): def tri(): if __name__ == "__main__": tri() And then call it like this: import modtest modtest.square() modtest.tri() why would I just get ability to call the 'square()

[Tutor] importing my module imports only one function

2014-01-30 Thread Ian D
if I create a module called "modtest.py" like this: import turtle def square(): for i in range(4): turtle.fd(100) turtle.lt(90) def tri(): for i in range(3): turtle.fd(100) turtle.lt(120) if __name__ == "__main__": tri() And then call it