Re: problem with include directive on cheetah 2.4.0
"Uhanov, Kirill" <[email protected]> Mon, 16 Nov 2009 08:19:40 +0000
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <5C4638D88804264B87BAF83BB0FDE5CC01187B0AB4@irsmsx504.ger.corp.intel.com> |
Thanks, James, for your information. Tyler, this is not windows specific problem. I've reproduced that on Linux too. Could I get some workaround for cheetah name generation? Kirill -----Original Message----- From: James Abbatiello [mailto:[email protected]] Sent: Saturday, November 14, 2009 8:00 AM To: Uhanov, Kirill; [email protected] Subject: Re: [Cheetahtemplate-discuss] problem with include directive on cheetah 2.4.0 On Fri, Nov 13, 2009 at 5:15 PM, <[email protected]> wrote: > At first glance, nothing here looks wrong (at least in your usage of #include), > that said I won't have a chance to take a look at this until tomorrow morning. > > Do you have access to a Mac or Windows machine to try this there? I'd just like > to rule out that this is not a Cheetah/Windows issue. The generated class name starts with 3 underscores. You can't refer to such a name from within a method due to private name mangling (http://docs.python.org/reference/expressions.html#atom-identifiers). Here's a small bit of Python that shows the problem: __B = 0 class A(): def f(self): return __B print A().f() This looks like it should print "0" but instead you get: NameError: global name '_A__B' is not defined There's probably some way around this but it may be better just to ensure that generated identifiers never start with 2 or more underscores. -- James Abbatiello -------------------------------------------------------------------- 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