Re: [Tutor] use my own code

2007-11-25 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > ok, i can import them. > > how do I use them though? When you import the module the code is executed. If you have executable code rather than function or class definitions then it will be executed (print statements etc). Thats why its always good pra

Re: [Tutor] use my own code

2007-11-25 Thread Evert Rol
> ok, i can import them. > > how do I use them though? That's also in the tutorial; if there are variables (constants) instead of functions in your module, it works just the same. > > I have some .py files that have things I need to use, sometimes > > it's the functions and sometimes it's the

Re: [Tutor] use my own code

2007-11-25 Thread Evert Rol
> I have some .py files that have things I need to use, sometimes > it's the functions and sometimes it's the whole .py (they have no > functions) > > how do I use them in my other .py codes? Import them at the top of your other .py file(s): import (without the .py extension). If they're i

Re: [Tutor] use my own code

2007-11-25 Thread elis aeris
ok, i can import them. how do I use them though? On Nov 26, 2007 1:42 AM, Evert Rol <[EMAIL PROTECTED]> wrote: > > I have some .py files that have things I need to use, sometimes > > it's the functions and sometimes it's the whole .py (they have no > > functions) > > > > how do I use them

[Tutor] use my own code

2007-11-25 Thread elis aeris
I have some .py files that have things I need to use, sometimes it's the functions and sometimes it's the whole .py (they have no functions) how do I use them in my other .py codes? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman