Re: Python implementation of "include"

2007-12-16 Thread Luke
Gabriel Genellina wrote: > En Thu, 13 Dec 2007 19:53:49 -0300, <[EMAIL PROTECTED]> escribió: > >> As I understand it, import myFile and include "myFile.py" are not quite >> the same. >> >> -- >> for import to work myFile.py must be in the same directory as the code >> that calls it accessible thr

Re: Python implementation of "include"

2007-12-13 Thread Gabriel Genellina
En Thu, 13 Dec 2007 19:53:49 -0300, <[EMAIL PROTECTED]> escribió: > As I understand it, import myFile and include "myFile.py" are not quite > the same. > > -- > for import to work myFile.py must be in the same directory as the code > that calls it accessible through PYTHONPATH, whereas include >

Re: Python implementation of "include"

2007-12-13 Thread Dustan
> [EMAIL PROTECTED] wrote: > > Hello, > > > I've been using the Python-based Karrigell web application framework. > > It has the very handy word "include" that inserts a code file into > > into the stream of execution. E.g. if myFile.py contains the code: > > > print "This is a message from myFile.

Re: Python implementation of "include"

2007-12-13 Thread lloyd
Hi Tim, Thanks for the response. As I understand it, import myFile and include "myFile.py" are not quite the same. -- for import to work myFile.py must be in the same directory as the code that calls it accessible through PYTHONPATH, whereas include "../somedirectory/myFile.py" works in Karri

Re: Python implementation of "include"

2007-12-13 Thread Tim Couper
import myFile would achieve this TIm [EMAIL PROTECTED] wrote: > Hello, > > I've been using the Python-based Karrigell web application framework. > It has the very handy word "include" that inserts a code file into > into the stream of execution. E.g. if myFile.py contains the code: > > print "

Python implementation of "include"

2007-12-13 Thread lloyd
Hello, I've been using the Python-based Karrigell web application framework. It has the very handy word "include" that inserts a code file into into the stream of execution. E.g. if myFile.py contains the code: print "This is a message from myFile.py" and my script is: print "Something" include