Re: Oddball question regarding .spy name
"Jonathan Ellis" <[email protected]>
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 05 Aug 2006 13:06:33 -0400, "Dustin " <[email protected]> said: > Sorry for this silly question, but what method of including code from a > different file and have those variables in that file available to the > included-from file? I'm trying to include an overall header that sets > variables depending on if a simple SQL query can be made. include.spyce() > or > [[.import name=myspycemodule]] don't seem to return variables to the > whole > context. Can you be more specific about what you're trying to do? >From this description it sounds like you can just use a python module... ## foo.py ## a = ... b = ... ## index.spy ## [[ import foo ]] [[ if foo.a:{ ]] [[= foo.b ]] [[ } ]] -- C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV