Re: include "apythonscript.py"

2005-05-09 Thread Duncan Booth
wrote: > Ah damn , that's the way. > > And what if you have a very big class and want to include some class > functions ? > > class ThisIsAClass: > def __init__(self): > > Here I want to import a class def > The usual way to handle that would be to not write a 'very big class' at a

Re: include "apythonscript.py"

2005-05-09 Thread martijn
Ah damn , that's the way. And what if you have a very big class and want to include some class functions ? class ThisIsAClass: def __init__(self): Here I want to import a class def -- http://mail.python.org/mailman/listinfo/python-list

Re: include "apythonscript.py"

2005-05-09 Thread Chris Curvey
the PHP include doesn't have an exact match in Python, but I think you can do what you intend. To follow the first example from php.net, this would work vars.py color = 'green' fruit = 'apple' test.py from vars import * print "A " , color, fruit HTH -- http://mail.python.org/mailman/listinfo

Re: include "apythonscript.py"

2005-05-09 Thread Larry Bates
How about? put apythonscript_function.py in a separate file then inculde apythonscript_function.py at the top of maincode.py Looks like you probably need to go back and read the tutorial. -Larry [EMAIL PROTECTED] wrote: > H! > > I'm trying to find a python function to use like this: > > --

include "apythonscript.py"

2005-05-09 Thread martijn
H! I'm trying to find a python function to use like this: -- maincode.py Include "apythonscript_function.py" -- end So I can split the maincode.py file in smalle pieces. Or yust save the function's in other file and include them once. I really want to use this because else { the maincode.py wi