|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Python code in Zope does not support "_"
It seems that ZOPE does not support Python variables that begins with "_".
I will get an error as such: "_hi" is an invalid variable name because it starts with "_" Anyone have any ideas why this is? Thanks |
|
#2
|
||||
|
||||
|
I do not know the answer to your question. I was able to find this but don't know if it is related to your problem:
Published objects Objects are published by including them in a published module. When a module is published, any objects that: - can be found in the module's global name space, - that do not have names starting with an underscore, - that have non-empty documentation strings, and - that are not modules are published. |
|
#3
|
||||
|
||||
|
I was reading my Core Python Programming book today and came across the following section. Again, I'm uncertain of it's relevance but thought it might help:
Quote:
|
|
#4
|
|||
|
|||
|
Just a bit of history,
Way back before Zope had scripts (pre ver 2.?) the only way to access standard modules such as "string" were thus: <dtml-var _.string.strip(variable_name_goes_here)> Not pretty and not much fun! With the advent of scripts within Zope this is pretty much unnecessary. Obviously they cant remove the code for backwards comaptibility (thankfully or my site would require lots of rework). Cheers Martin NetHomes |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Python code in Zope does not support "_" |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|