if find(v,'\r') = 0: v=join(split(v,'\r'),'')
-if find(v,'\n') = 0: v=join(split(v,'\n'),'br\n')
+if find(v,'\n') = 0: v=join(split(v,'\n'),'br /\n')
Out of curiosity, what is the reason for using join(split(...)) instead of just
replace()? Is it really faster or something?
I've now added the ability to set the message to be sent back to the FTP
client on FTPResponse. The patch is attached. We'll be using it and I hope
that it, or something similar, makes it into the 2.3.1.
Try submitting it to the collector. It's likely to get lost on the mailing list.
--jfarr
When mylfs references a directory meta_type is 'Local Directory'
but if mylfs references a file meta_type is 'File'.
How can I let the user download the file?
I tried it like this:
dtml-call "RESPONSE.setHeader('content-type',mylfs.content_type)"
dtml-var mylfs
It mostly worked, except
- Original Message -
From: "Anderson Ami" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 12:00 PM
Subject: [Zope] Calling a DTML Document using a string
How can I do a dtml document call using the call dtml tag ?
e.g.
- I have 3 DTML documents ( bot1, bot2
Boy did I ever misunderstand the question. Dang. Sorry! Nevermind me!
--jfarr
- Original Message -
From: "Dieter Maurer" [EMAIL PROTECTED]
To: "Anderson Ami" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 1:50 PM
Subject: Re: [Zope] Calling a DTML Document
Hello all,
One of the Local File System users pointed out that calling
manage_addLocalFS from dtml doesn't work. I did some checking and discovered
that calling manage_addXXX doesn't work for any of the built-in products
either. My testing was with 2.2.5. Am I crazy or didn't this work at one
Now just don't get me started on
"_['index-whatever']" :-)
Funny. I patched that too, and I know I'm not the only one. It also "fell
through the cracks". *sigh*
I've never understood the reaction that always comes from DC w.r.t. patches
that
fix that.
There always seems to be a
Anyway, I'm sorry that your proposal fell through the cracks;
the "hot money" these days is all on HiperDOM/XHTML stuff, rather
than DTML, so it may stay there (especially if the patch is hard
to apply to a recent Zope).
It would be easy to apply the patch. The work would be in testing it.
Now just don't get me started on
"_['index-whatever']" :-)
Funny. I patched that too, and I know I'm not the only one. It also "fell
through the cracks". *sigh*
--jfarr
___
Zope maillist - [EMAIL PROTECTED]
do an xml export. You can save cvs that to your hearts content.
... but then I'll have to forego readability, edit-ability, etc.
Frankly, I'm a little surprised that this isn't a problem for more people,
I'll wager that it is a problem for lots of people but you don't hear from them
here.
http://www.zope.org/Members/jfarr/Patches/dtml-break
I requested that this page be cataloged but it never was. I also submitted it as
a patch to the distribution but it was refused. Something about a new dtml-in
implementation that I haven't seen materialize in the last 5 versions or so.
I
Maybe it's time for mandatory subject keys. Something like NEW: for
newbies questions; OT: for off-topic (like this);
You mean ADM: for administrative topics.
I think it's a great idea. I'll do it if DC decides on the keys.
--jfarr
___
Zope
Not sure why you're crashing but your SQL looks incorrect and incomplete. It
should be something more like:
select * from songdetails
where
some_field='' and
some_other_field = 2000
...
;
Hope this helps,
--jfarr
- Original Message -
From: "alankirk" [EMAIL PROTECTED]
To:
in python you can do:
str(int)
and in zope you do it like
_.str(int)
You can also use the short form in both Zope and Python:
`int`
Two of those funny `` characters surrounding what you want converted to a
string.
The backtick notation `` is actually the shorthand for repr(), not
This sounds pretty exciting. Sounds like someone should set up a proposal on
dev.zope.org.I'm afraid I wouldn't be able to contribute much development right
now but I'd be willing to help test and participate in discussions.
--jfarr
- Original Message -
From: [EMAIL PROTECTED]
To:
dtml-var sequence-length
- Original Message -
From: "Edwin Martin" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 02, 2001 7:23 AM
Subject: [Zope] dtml-in: total??
Hello,
I'm making a generic DTML-method which shows a bar like
AltaVista does:
[ previous] [1]
I used to
write text filters in C and Lex for my previous employer - one of these days
I will figure out how to extend python with C and do this.
Here's one that's written entirely in Python:
http://www.cosc.canterbury.ac.nz/~greg/python/Plex/
I've seen a couple of other implementations out
At least the "Local File System" object does not expose
its children via "getattr" (which is required for the
usual "." operator to work) but only via "[...]".
This probably is a bug.
No this is by design, as explained in the how-to. Most operating systems allow
period (.) characters in
Maybe I'm mistaken, but it seems like you can put an instance of an object that
doesn't inherit from Persistent into the ZODB just fine, but its contents won't
persist, so you'll always end up with a copy of the object as it was first added
to the database.
--jfarr
- Original Message -
Oops. You snipped the contents of MoreStuff.addStuff(). No way to tell what's
going on without that!
--jfarr
- Original Message -
From: "Matt" [EMAIL PROTECTED]
To: "Jonothan Farr" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, December 08, 2000 2:39 P
I've had patches for this for some time at
http://www.zope.org/Members/jfarr/Patches/Patches/dtml-in-sv
I was told they weren't being considered for inclusion because they will be
superceded by the named dtml-in construct (which would also supercede your
second patch). No word on when or if
ideally two external methods. one recurses through folders collect
objects of a particular meta_type
the second external method calls the first to get a collection of
objects for a particular meta_type and performs string manipulations on
the raw() representation of the method.
I think a
The Local File System product does this. You can check out the source code at
http://www.zope.org/Members/jfarr/Products/LocalFS.
--jfarr
- Original Message -
From: "Max M" [EMAIL PROTECTED]
To: "Zope@Zope. Org" [EMAIL PROTECTED]
Sent: Tuesday, November 14, 2000 4:39 PM
Subject: [Zope]
For a File object, you want "str(ob.data)", where 'ob' is your File object.
--jfarr
- Original Message -
From: "Jason C. Leach" [EMAIL PROTECTED]
To: "Steve Spicklemire" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, October 29, 2000 5:56 PM
Subject: Re: [Zope] Get file contents.
As long as you're only storing text, whether it be html or dtml or what, then
LocalFS might be a good solution for you. You still get through-the-web content
management, and lots of neat Zope-isms like acquisition. What you can't do is
attach persistent properties to the files you store locally,
Check out LocalFS v0.9.6. Now with ZCatalog support!
--jfarr
- Original Message -
From: "neeloy_saha" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 17, 2000 5:12 AM
Subject: [Zope] Searching a LocalFS through Zope
Hi all,
Well I had sent this
Changes v0.9.6
- Fixed saving large File and Image objects.
- Added ZCatalog support.
http://www.zope.org/Members/jfarr/Products/LocalFS/
--jfarr
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross
There are some patches floating around to add cataloging to LocalFS objects. I
haven't gotten around to including them in the standard distro.
--jfarr
- Original Message -
From: "neeloy_saha" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, October 13, 2000 4:56
Try using a StringIO object as your file.
import htmllib
import formatter
from cStringIO import StringIO
def index(self, html):
file = StringIO()
fmtr = formatter.AbstractFormatter(formatter.DumbWriter(file))
p = htmllib.HTMLParser(fmtr)
p.feed(html)
file.seek(0)
return
That should work. Can you post the traceback?
--jfarr
- Original Message -
From: "Grewen.de" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, October 01, 2000 6:48 PM
Subject: [Zope] How to use manage_addLocalFS
Hi all,
I want to create an LocalFS object.
I use dtml-call
Oops. Forgot to mention, this patch adds a new param to the tree tag,
'urlparam_expr' which is a Python expression to evaluate and use as the
urlparam.
--jfarr
- Original Message -
From: JĂșlio Dinis Silva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 18, 2000 12:59 PM
If they are:
- very large (MB+)
- generated by some external process
-or-
- uploaded by users
...then Local File System is one way to go.
Otherwise, loadsite.py will just slurp them all into the ZODB and you can serve
them from there.
--jfarr
- Original Message -
From: Nick Trout
How do I get the count in a sequence?
dtml sequence-length
--jfarr
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
What if an object id contains a period?
--jfarr
- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Steve Alexander [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 11:59 AM
Subject: [Zope-dev] Cool, we like the . :-)
Steve Alexander wrote:
I
HTTP is stateless. You'll have to build the entire query string and put it into
your redirect URL.
--jfarr
- Original Message -
From: Stuart Foster [EMAIL PROTECTED]
To: Zope List [EMAIL PROTECTED]
Sent: Tuesday, August 15, 2000 10:19 AM
Subject: [Zope] How to use RESPONSE.redirect ?
Once again I'll point out that I have a patch that allows sequence_item. I've
submitted it to the collector but it was rejected because of the AFAIK
not-yet-scheduled "named dtml-in" feature.
http://www.zope.org/Members/jfarr/Patches/dtml-in-sv/
--jfarr
Hardware, n.:
The parts of a
Well in Python a list is mutable and a tuple is not.
--jfarr
- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 14, 2000 3:38 PM
Subject: [Zope] dtml-in and tuples
Hi,
Why and how are python tuples (like, this) handled differently
Because it throws a SystemExit exception. If you're not running in debug mode
"-D" you won't see the traceback.
--jfarr
"Work like you don't need the money,
love like you've never been hurt,
and dance like no one is watching!"
Anonymous
- Original Message -
From: William BC Crandall
You should be able to eliminate the dtml method like so:
upload_image_form
-
FORM ACTION="LocalFS_objekt_id/manage_upload" METHOD="POST"
ENCTYPE="multipart/form-data"
INPUT TYPE="hidden" NAME="action"
for name,value in REQUEST.form.keys():
Note the function call (parentheses).
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
___
Zope maillist - [EMAIL PROTECTED]
Dang! Just when I think I understand this acquisition thing. ;)
Sorry for the misinformation.
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Jonothan Farr [EMAIL PRO
Are you doing a dtml-var or dtml-call to call your external method? I believe
you need a dtml-call.
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
- Original Message -
From: Christopher J. Kucera [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Is it possible to have just one top level object that refers to
other objects that get overridden as you go into other folders?
Acquisition works the other way around. You can create objects in subfolders
whose contents are overriden higher up. You can't have an object at the top
whose
You should submit this to the collector, preferable with a patch! ;)
Otherwise it's likely to get lost in the chaos of the list.
http://classic.zope.org:8080/Collector
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
- Original Message -
Jonothan Farr wrote:
Is it because the document is at the top of the namespace stack instead of
the
request object in the dtml document case, but not in the dtml method case?
Hurm, thinking for the right words and I think(?) namespace is the right
one.
Anyway, DTML documents have one
I can' t seem to get beyond importing Document (cannot import name
Document). Do I need to import other modules? Is this the best/only way to
do this?? Appreciate any help.
from Products.XMLDocument import Document
I think you missed an 'XMLDocument'.
from
I couldn't reproduce this. The following code works for me in Zope 2.1.6,
verbatim.
dtml-var standard_html_header
dtml-call "REQUEST.set('spec', '*')"
dtml-call "REQUEST.set('num_dir_columns', 3)"
table
dtml-call "REQUEST.set('ctr', 0)"
dtml-in "local.fileValues(REQUEST.get('spec', _.None))"
It's been a while since the last LocalFS release. I wanted to fix a couple
of major issues for the next release but I'm a little stuck. I decided to
post a minor bug fix release instead.
This release fixes the following issues.
- Fixed bobobase_modification_time.
- Fixed cross-platform bug
How about just:
dtml-var "_.len(folder.objectIds())"
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
- Original Message -
From: Andy McKay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 21, 2000 3:53 PM
Subject: Re: [Zope] dumb
Folder creation isn't really supported in LocalFS at the moment. Very
low level support is there (module function _save_Folder) but it's not
intended to be called externally and there doesn't seem to be any path
to call it. There is certainly not a local definition of
manage_addFolder
I've patched this for 2.1.6. Now you can use sequence_item in addition to
sequence-item.
http://www.zope.org/Members/jfarr/Patches/dtml-in-sv
There's a much cooler and more elegant solution in the pipe for 2.2.
http://www.zope.org/Members/4am/DTMLWiki/NamedDTMLInLoop
--jfarr
"Perl is worse
Was the LocalFS upload support released? Earlier versions did not support
upload, but I know the author was working on it.
Yup. Since 0.8.1.
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
___
Zope
I have found function calls such as:
manage_roleForm=HTMLFile('roleEdit', globals()) which I believe creates
an HTML document template from the named file. But, what is the
mechanism that calls/displays mange_roleForm?
The class heirarchy looks something like this:
Globals.HTMLFile
1)Folders names are directly related to string fields
in a MySQL database which use spaces between words (eg
New York), but folders names don't use spaces (eg
NewYork). How can I skip spaces from database fields to
make them refer to these folders (eg New York --
NewYork)?
How do you do to cache those objects, since LocalFS
referenced objects are not cached by Zope?
They aren't cached. I experimented with adding a cache, but ran into some
problems and gave up. It would probably be worth giving it another shot, though.
--jfarr
"Perl is worse than Python because
In theory, you could use ZCatalog to catalog objects in the
file system or in a RDBMS, providing that you can provide
paths for them. I don't think anyone's done this yet. There
are bound to be bumps from wjoever does it first. :)
There's a patch to the Local File System product to allow
I am using a combination of Zope to create and maintain
a MySQL database. This database is full of images files
so I decided to keep them outside MySQL for caching
facilities. My question are: 1)image files referenced
by LocalFS objects are cached by Zope?
No.
and 2)In this
It sounds to me like the Apache server is just writing the data directly to the
HTTP connection as it is read. I believe that's how HTTP "streaming" works. I
also believe this is possible to do using the Zope HTTPResponse object. Does
anyone have any ideas?
--jfarr
"Perl is worse than Python
Sorry for the delayed response. I just posted a patch for this on the Zope
site at http://www.zope.org/Members/jfarr/Patches
--jfarr
- Original Message -
From: Brenton Bills [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 22, 2000 12:06 AM
Subject: [Zope] ZMysqlDA
Hi
You want sequence-end, not sequence-last. That just bit me yesterday. ;)
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
- Original Message -
From: Federico Di Gregorio [EMAIL PROTECTED]
To: Zope Dev [EMAIL PROTECTED]
Sent: Thursday, June 22,
Again, after some searching, I am looking for the syntax to write a
file / append to a file in a Local File System.
This is certainly where my Python days seem to slow my down b/c I
would have just:
contents = open('/path/file.txt', "r")
to read and
contents = open('/path/file.txt',
I've created a new product similar to etcUserFolder that authenticates against
an NIS database.
http://www.zope.org/Members/jfarr/Products/NISUserFolder/
This also improves upon the etcUserFolder product by defining a separate role
for each user group, allowing more fine-grained control of
This is a known problem with LocalFS. The only workaround I know of is to put
your dtml code into a file, give it a .dtml extension, and place it in the
directory you want to upload to. This problem will be addressed in the next
version of LocalFS.
--jfarr
"Perl is worse than Python because
How about this:
+drive,rest=os.path.splitdrive(path)
+if drive:
+path = string.replace(rest, '\\', '/')
Oops, looks like this doesn't work after all. The Linux version of
splitdrive doesn't actually do the split :-(.
Doh! Looks like we'll need to roll our
What about just storing your meta-data in files in the local file system?
Then
you wouldn't need to modify the LocalFS product at all. Just write a ZClass
that
can read/write you meta-data file format.
Might well be a better approach. I'll think about it. Unfortunately,
it doesn't
This is a known bug. Thanks for the patch. The problem with it is that
filenames
containing backslash characters are valid on Unix. I haven't been able to
come
up with a solution to this. Any ideas?
That's why I check for a file name that starts with a letter followed
by a colon (hmm,
BTW: I'm working on associating other annotation data with LocalFS
files. My current thinking is to release the result as a separate
product, since I can't think of a way to do it that doesn't hack
LocalFS sources. Basically, I'm adding a PersistentMapping (from id
to arbitrary class) to
NewbieQ of the moment:
So there's a folder on my server, call it \\server\files\logos. I want
to list its contents in a drop-down listbox in a form; something like
select name="logo_filename"
option selected value="default.jpg"default.jpg
option value="file1.jpg"file1.jpg
...
I think, cataloging "LocalFS" content would be nice.
I have the following problems with it:
1. "LocalFS" defines various meta types:
"Local File System", "Local Directory" and "Local File".
Only "Local File System" is a "true" meta type which
should appear in the available
Jet is inherently thread-unsafe, and M$ has no plans to fix this (such
a fix would cut into their ability to sell SQL Server). This issue
has been a long-running problem in the Windows world; the only
solution is to serialize *all* access to the DB (even concurrent
*reads* can foul each
Many of these variables cause problems for those starting out with Zope.
Why not create alternate names such as sequence_* and degrade the
former?
Gotta agree with this :-)
Here's the patch. I'll submit it to the collector too. Enjoy.
Here's a reference that dropped from Google when I asked "corruption
concurrent microsoft access database"
http://dgl.com/dglinfo/1998/dg980825.html (half way down page)
I wouldn't use Access with Zope.
Sounds like a bug in the Access UI not the underlying Jet DB engine.
--jfarr
Just curious. How do you do diffs? How do you resolve conflicts? How do you
handle login/logout?
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
___
Zope-Dev maillist - [EMAIL PROTECTED]
Good questions!
You can just go to the 'admin' tab and type 'diff'.
The admin tab lets you execute just about any cvs command
with arguments stat, rtag etc etc.
Doing a diff on a zexp file isn't going to be very helpful, though. Any thoughts
on integrating some sort of xml diff
Is anybody bold enough to try Zope with ODBC to an ACCESS database?
I wrote a Jet database adapter so you can skip the ODBC and go straight to
access.
http://www.zope.org/Members/jfarr/Products/ZJetDA/
SQL server is a different story.
--jfarr
"Perl is worse than Python because people wanted
Note that it works from the Python command line, but not from a Zope
external method. I'm still trying to figure out why it is failing from
within Zope (anybody have an idea?).
How does it 'not work' from an external method?
--jfarr
"Perl is worse than Python because people wanted it
There's an external method that loads a batch of files from the local machine
into the zope database. I've got a copy if you're interested, since I can't seem
to find it on the site anymore.
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
-
I'm just getting started, but managed to use
the following to display only JPG's, and then
only ones starting with "tn_" (my thumbnails):
There's an easier way. =)
ul
dtml-in "tester.fileIds(spec='tn_*.jpg')"
img src="tester/dtml-var sequence-item"
/dtml-in
/ul
--jfarr
"Perl is
78 matches
Mail list logo