problem with include directive on cheetah 2.4.0
"Uhanov, Kirill" <[email protected]> Fri, 13 Nov 2009 09:27:02 +0000
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <5C4638D88804264B87BAF83BB0FDE5CC0118741096@irsmsx504.ger.corp.intel.com> |
Hi, All
Could you help me with my issue?
Some of my templates use include directive.
But I have NameError error then I run generated py file.
For example, I have tmpl and txt files (they are located in c:\__1 dir)
temp.tmpl
#include "temp.txt"
temp.txt
Hello
Call compile cmdline command
python C:\python\Scripts\cheetah-compile temp.tmpl
Run generated py script:
python temp.py
Traceback (most recent call last):
File "temp.py", line 124, in <module>
CmdLineIface(templateObj=temp()).run()
File "C:\python\lib\site-packages\Cheetah\TemplateCmdLineIface.py", line 44, in run
print self._template
File "C:\python\lib\site-packages\Cheetah\Template.py", line 997, in __str__
rc = getattr(self, mainMethName)()
File "temp.py", line 82, in respond
self._handleCheetahInclude("temp.txt", trans=trans, includeFrom="file", raw=False)
File "C:\python\lib\site-packages\Cheetah\Template.py", line 1582, in _handleCheetahInclude
_globalSetVars=self._CHEETAH__globalSetVars)
File "__1_temp_txt.py", line 55, in __init__
NameError: global name '_1_temp_txt__1_temp_txt' is not defined
If I move temp.py to c:\1 directory all works fine
What did I do wrong? Is this known problem?
Thanks, Kirill
--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss