how come I can't add an external method...
Hi all, I'm trying to add this snippet as an external method ------ import htmlfmt def test(): "Testing zope 1" a = htmlfmt.UL(("1", "2", "3")) return a print test() ----- (htmlfmt is a library from the van Rossum, Watters and Ahlstrom book 'Internet programming with Python'). It does work... 96 % python test.py <UL> <LI>1 <LI>2 <LI>3 </UL> but trying to add this as an external method just does not happen. I'm left staring at a rotating beachball while the system tries to add it to the database. The following works fine... ------- def test(): "Testing zope 2" a = """<UL> <LI>1 <LI>2 <LI>3 </UL> """ return a -------- Can someone please point out the fly in the ointment here? I feel like I'm sitting in a corner wearing a <|0 at the moment... ta tone ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
Answering my own message....tut tut. The problem was that htmlfmt was in my /usr/local/lib/python/site-packages/ directory. Once I copied it to Zopes' lib/python1.5 directory everything works fine. (Is this behaviour documented anywhere....should be I reckon). Tone
Hi all, I'm trying to add this snippet as an external method ------ import htmlfmt
def test(): "Testing zope 1" a = htmlfmt.UL(("1", "2", "3")) return a
print test() -----
(htmlfmt is a library from the van Rossum, Watters and Ahlstrom book 'Internet programming with Python').
It does work...
96 % python test.py <UL> <LI>1 <LI>2 <LI>3 </UL>
but trying to add this as an external method just does not happen. I'm left staring at a rotating beachball while the system tries to add it to the database.
The following works fine... ------- def test(): "Testing zope 2" a = """<UL> <LI>1 <LI>2 <LI>3 </UL> """ return a --------
Can someone please point out the fly in the ointment here? I feel like I'm sitting in a corner wearing a <|0 at the moment... ta tone
Dr Tony McDonald, FMCC, Networked Learning Environments Project The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
participants (1)
-
Tony McDonald