Roberto Benitez wrote:
The following worked for me:
with a file object containing the following text:
line one of test file
line two of test file
line three of test file
I was table to parse lines w/ following code:
file="%s" % context.textfile
num=1
for line in file.split("\n"):
prin
[EMAIL PROTECTED] wrote:
Roberto Benitez wrote:
file="%s" % context.textfile
Huh? Isn't that just a weird and probably inefficient way of writing
"file=str(context.textfile)"?
Sso I was mistaken when I said \n were removed... I can indeed split by
'\n' the result of str(contex
Hi,
I have a problem when I upload an ASCII text file into a zope2 folder. I
have a plain-text file with double quotes and line breaks. However, once
uploaded, double quotes become " and line breaks become \n. Even if
I change the property into text/plain or text/xml, I get the same problem.
O
Hi,
I am trying to upload text files as File objects instead of DTML
documents to avoid HTML escaping.
What is the type of the File object in Zope ? The example in the Zope
book are ZopePageTemplate and PythonScript objects,, but I just want a
File object. This does not work:
def PUT_factory
Eric Fernandez wrote:
Hi,
I am trying to upload text files as File objects instead of DTML
documents to avoid HTML escaping.
What is the type of the File object in Zope ? The example in the Zope
book are ZopePageTemplate and PythonScript objects,, but I just want a
File object. This does not
Stefan H. Holek wrote:
On 10. Aug 2006, at 13:52, Eric Fernandez wrote:
def PUT_factory( self, name, typ, body ):
ob = None
if typ.startswith('text'):
ob = File(name, '', body, content_type=typ)
return ob
However, I cannot upload jpg files anymor
Hi,
I am using a ZCTextIndex to index and search text files. I use a search
form to retrieve the objects that match a search. I would like to know
if it is possible to retrieve more details about the search, in
particular the line numbers (or the word position in the file) where a
match has b