Re: [Zope] Calling a DTML Document using a string

2001-01-24 Thread Jonothan Farr
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 Docume

Re: [Zope] Calling a DTML Document using a string

2001-01-24 Thread Jonothan Farr
- 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 ( bot

Re: [Zope] download file from LocalFS

2001-01-24 Thread Jonothan Farr
> 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: It mostly worked, except that my html documents were getting html-quoted. If you can solve that I think

Re: [Zope] LocalFS and PathHandler

2001-01-23 Thread Jonothan Farr
> Now I should have a reference to the object in mylfs. > > How can I detect if mylfs is a file or a directory? --jfarr ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (

Re: [Zope] Stopping a

2001-01-19 Thread Jonothan Farr
> 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

Re: [Zope] Stopping a

2001-01-19 Thread Jonothan Farr
> > >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

Re: [Zope] Tools used for programming Zope

2001-01-18 Thread Jonothan Farr
> >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 he

Re: [Zope] Stopping a

2001-01-18 Thread Jonothan Farr
>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] http://lists.zope.org/mailman/listinfo

Re: [Zope] Is it time for mandatory subject keys?

2001-01-17 Thread Jonothan Farr
> 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 ma

Re: [Zope] Stopping a

2001-01-17 Thread Jonothan Farr
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 would

Re: [Zope] In desparate need of some help

2001-01-16 Thread Jonothan Farr
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:

Re: [Zope] [python] converting int to string?

2001-01-08 Thread Jonothan Farr
> > >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 notatio

Re: [Zope] [python] converting int to string?

2001-01-08 Thread Jonothan Farr
> >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

Re: [Zope] Advice on searching/indexing Word documents?

2001-01-03 Thread Jonothan Farr
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: <[EM

Re: [Zope] Advice on searching/indexing Word documents?

2001-01-02 Thread Jonothan Farr
>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 o

Re: [Zope] dtml-in: total??

2001-01-02 Thread Jonothan Farr
- 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] [2] [3] [4] [ne

Re: [Zope] Stupid File Upload Question

2000-12-15 Thread Jonothan Farr
What sort of problems were you seeing with LocalFS? Maybe I can fix them. Thanks, --jfarr - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 15, 2000 4:22 PM Subject: [Zope] Stupid File Upload Question > This is for Jos: > > I ran into the s

Re: [Zope] LocalFS question

2000-12-12 Thread Jonothan Farr
> 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 i

Re: [Zope] LocalFS question

2000-12-12 Thread Jonothan Farr
See the how-to: http://www.zope.org/Members/jfarr/Products/LocalFS/HowTo/DTML_with_LocalFS --jfarr - Original Message - From: "Leichtman, David J" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 11, 2000 2:54 PM Subject: [Zope] LocalFS question > > How do you access a

Re: [Zope] persistence and dictionaries

2000-12-08 Thread Jonothan Farr
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, D

Re: [Zope] persistence and dictionaries

2000-12-08 Thread Jonothan Farr
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 - F

Re: [Zope] Patch to avoid hypenation variables and more

2000-12-04 Thread Jonothan Farr
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 named

[Zope] Re: Making lots of external data searchable?

2000-12-01 Thread Jonothan Farr
You could use ZCatalog with the Local File System product to index your text files stored in the file system. http://www.zope.org/Members/jfarr/Products/LocalFS --jfarr - Original Message - From: "Anselm Lingnau" <[EMAIL PROTECTED]> Newsgroups: local.m2n.zope To: <[EMAIL PROTECTED]> Sen

Re: [Zope] Search and replace

2000-11-20 Thread Jonothan Farr
> 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 thin

Re: [Zope] PropertyManager

2000-11-14 Thread Jonothan Farr
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: [Zop

Re: [Zope] Get file contents.

2000-10-30 Thread Jonothan Farr
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 conte

Re: [Zope] Bypass ZODB and use File System

2000-10-19 Thread Jonothan Farr
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, n

Re: [Zope] Searching a LocalFS through Zope

2000-10-17 Thread Jonothan Farr
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

[Zope] new LocalFS release: 0.9.6

2000-10-16 Thread Jonothan Farr
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 p

Re: [Zope] Ability to catalog "localFS objects" in the portal catalog

2000-10-13 Thread Jonothan Farr
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

Re: [Zope] If/And statements?

2000-10-11 Thread Jonothan Farr
shorthand for i.e. everthing inside expr= is evaluated as a python expression in the current namespace. --jfarr - Original Message - From: "J. Atwood" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 11, 2000 2:15 PM Subject: [Zope] If/And statements? > Ok.. a

Re: [Zope] Fighting htmllib in external method

2000-10-10 Thread Jonothan Farr
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 f

Re: [Zope] Zope, Threads and Signals

2000-10-06 Thread Jonothan Farr
I would just use the asynchronous network clients in asyncore and asynchat. Since ZServer also uses them you would be automagically plugged into the ZServer select loop if you were sitting behind ZServer. --jfarr - Original Message - From: "Wilkinson Charlie E" <[EMAIL PROTECTED]> To: <[

Re: [Zope] How to use manage_addLocalFS

2000-10-02 Thread Jonothan Farr
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 but that does

Re: [Zope] dtml-tree urlparam

2000-09-18 Thread Jonothan Farr
I hacked this in already, but haven't gotten around to posting my patch. The updated TreeTag.py file is attached. Copy it to your lib/python/TreeDisplay directory. This is from a Zope 2.1.6 installation. You should use diff/patch if you've upgraded. --jfarr - Original Message - From: Júl

Re: [Zope] dtml-tree urlparam

2000-09-18 Thread Jonothan Farr
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

Re: [Zope] Static pages

2000-09-14 Thread Jonothan Farr
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 <[E

Re: [Zope] Getting the count from dtml-in

2000-09-12 Thread Jonothan Farr
> How do I get the count in a sequence? --jfarr ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce ht

[Zope] Re: [Zope-dev] Cool, we like the . :-)

2000-08-17 Thread Jonothan Farr
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:

Re: [Zope] Zope bug or my stupidity?

2000-08-15 Thread Jonothan Farr
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 comp

Re: [Zope] How to use RESPONSE.redirect ?

2000-08-15 Thread Jonothan Farr
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 ?

Re: [Zope] dtml-in and tuples

2000-08-14 Thread Jonothan Farr
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 diffe

Re: [Zope] retrieving data from REQUEST.form

2000-08-11 Thread Jonothan Farr
> You can still replace them. You can do "_.string.replace(REQUEST.form['list'], '\n', '')"> and it should do > what you want. Or, how about just: --jfarr "Work like you don't need the money, love like you've never been hurt, and dance like no one is watching!" Anonymous ___

Re: [Zope] Why is 'Shutdown' an Error?

2000-08-10 Thread Jonothan Farr
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 <[EM

Re: [Zope] interating though REQUEST.form in python???

2000-08-08 Thread Jonothan Farr
> for name,value in REQUEST.form.keys(): > > Note the function call (parentheses). Oops! I meant: for key in REQUEST.form.keys(): --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ Zope maillist - [E

Re: [Zope] interating though REQUEST.form in python???

2000-08-08 Thread Jonothan Farr
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] http://lists.zope.org/mailman/listinfo/z

Re: [Zope] Re: Upload on a local File System

2000-08-08 Thread Jonothan Farr
You should be able to eliminate the dtml method like so: upload_image_form - File --jfarr ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org

Re: [Zope] Redirecting from Python?

2000-08-04 Thread Jonothan Farr
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]> Sen

Re: [Zope] acquisition vs. inheritance

2000-08-04 Thread Jonothan Farr
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 &

Re: [Zope] acquisition vs. inheritance

2000-08-03 Thread Jonothan Farr
> 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 conten

Re: [Zope] dtml-tree question

2000-07-31 Thread Jonothan Farr
> 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. &g

Re: [Zope] boolean property bug

2000-07-31 Thread Jonothan Farr
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 - From

[Zope] dtml-tree question

2000-07-27 Thread Jonothan Farr
What is the difference between using the dtml-tree tag in a dtml method and using it in a dtml document? I have code that works perfectly in a dtml method but when I try the exact same code in a dtml document it doesn't display anything. Is it because the document is at the top of the namespace s

Re: [Zope] "REQUEST" a string object?

2000-07-24 Thread Jonothan Farr
I couldn't reproduce this. The following code works for me in Zope 2.1.6, verbatim. In case we end in the middle of a row... Maybe you can play with this as a starting point. I added a couple of REQUEST.set() calls at the top to

Re: [Zope] Adding an XMLDocument instance Programmatically

2000-07-24 Thread Jonothan Farr
> 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 Products.XMLDocument.XMLD

[Zope] new LocalFS version 0.9.5

2000-07-23 Thread Jonothan Farr
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 ca

Re: [Zope] dumb dtml-in question

2000-07-21 Thread Jonothan Farr
How about just: --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 dtml-in question > > > > >

Re: [Zope] Creating folders in LocalFS

2000-07-19 Thread Jonothan Farr
> 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_addFold

Re: [Zope] sequence-item and ""

2000-07-18 Thread Jonothan Farr
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 th

Re: [Zope] Re: Re: [Zope] LocalFS Documentation

2000-07-13 Thread Jonothan Farr
> 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 m

Re: [Zope] .dtml files

2000-07-12 Thread Jonothan Farr
> 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 D

Re: [Zope] File referencing and LocalFS

2000-07-05 Thread Jonothan Farr
> 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)? _.string.r

[Zope] Re: importing text files

2000-06-30 Thread Jonothan Farr
> I have a file object (a text file) in my project that is displayed in a dtml > document. Is there a way to make that object dynamic, i.e. when a user > changes the file (in notepad, or something) and saves it, those changes are > reflected next time the dtml document is loaded. > > When I start

[Zope] LocalFS cache, was Re: ZODB or not ZODB?

2000-06-29 Thread Jonothan Farr
> 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 becaus

Re: [Zope] LocalFS and Cache Issues

2000-06-28 Thread Jonothan Farr
> 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 > sit

Re: [Zope] ZODB or not ZODB?

2000-06-28 Thread Jonothan Farr
> 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

[Zope] Re: Slow File Access With LocalFS

2000-06-27 Thread Jonothan Farr
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 be

[Zope] Re: Slow File Access With LocalFS

2000-06-27 Thread Jonothan Farr
> I'm using LocalFS to reference a large collection of mp3 files. (I figured > it was probably a good idea not to upload the whole shebang to the ZODB, so > I just added a LocalFS object to reference the top directory of the > collection.) When I try to download a file by calling the Zope object (

Re: [Zope] ZMysqlDA

2000-06-24 Thread Jonothan Farr
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

[Zope] Re: Problem with LocalFS

2000-06-22 Thread Jonothan Farr
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 peop

[Zope] new product: NISUserFolder

2000-06-22 Thread Jonothan Farr
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 which

[Zope] Re: Writing to LocalFS

2000-06-22 Thread Jonothan Farr
> 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/fi

[Zope] Re: LocalFS w/ annotation data

2000-06-20 Thread Jonothan Farr
> > 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 d

[Zope] Re: LocalFS cross platform bug

2000-06-20 Thread Jonothan Farr
> > 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

[Zope] Re: Newbie: Listing filesystem objects?

2000-06-19 Thread Jonothan Farr
> 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 > > >default.jpg >file1.jpg >... > > > Needless to say, I've installed the local filesystem product and > creat

[Zope] Re: LocalFS w/ annotation data

2000-06-19 Thread Jonothan Farr
> 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)

[Zope] Re: LocalFS cross platform bug

2000-06-19 Thread Jonothan Farr
> > 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 col

[Zope] Re: LocalFS cross platform bug

2000-06-19 Thread Jonothan Farr
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? --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ---

Re: [Zope] dtmll-in variables

2000-06-07 Thread Jonothan Farr
> is there an easy way to get a record count of total number of items or > iterations returned by a dtml-in tag? --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ Zope maillist - [EMAIL PROTECTED] htt

Re: [Zope] sequence-*

2000-05-26 Thread Jonothan Farr
> > 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. http://www.zope.org/Members/jfarr/Patches/d

Re: [Zope] Use of lambda expression in DTML

2000-05-26 Thread Jonothan Farr
> In brief: I get a NameError when invoking "filter(...)" from DTML. I thought this was a built-in python method, so I'm a bit puzzled. Certain built-ins are not available in dtml for security and other reasons, filter and lambda are among them. As far as I know, you'll need to use an external

[Zope] Re: M$soft

2000-05-26 Thread Jonothan Farr
> 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 eac

[Zope] Re: Count specific objects

2000-05-25 Thread Jonothan Farr
> How do I tell the _.len function to count how many objects exists in a > specific folder? "_.len(somefolder.objectIds())" --jfarr ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encod

Re: [Zope] M$soft

2000-05-25 Thread Jonothan Farr
> 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

Re: [Zope] M$soft

2000-05-24 Thread Jonothan Farr
> 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

Re: [Zope] uploading a batch of files

2000-05-22 Thread Jonothan Farr
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 - Origina

Re: [Zope] LocalFS Question

2000-05-22 Thread Jonothan Farr
> Does anyone out there know how I can prevent LocalFS from translating CR/LF > pairs in a text file to LFs when serving up the file? > > Or will I need to "massage" it in Zope before sending it? > > In this case the files are Windows/DOS batch files. It sounds like the files have unix endlines

Re: [Zope] Executing an external program

2000-05-22 Thread Jonothan Farr
> 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 w

Re: [Zope] expression evaluation in dtml

2000-05-19 Thread Jonothan Farr
> But when I then do a >Hello , > nothing happens, and that is not what I am expecting. > > Can anybody please explain and help me out? REQUEST.AUTHENTICATED_USER returns a User object, not a string. You want: --jfarr ___ Zope maillist - [E

Re: [Zope] Local File System

2000-05-19 Thread Jonothan Farr
> 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. =) --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 _

Re: [Zope] Local File System

2000-05-18 Thread Jonothan Farr
> I've read that I can get the filenames as id's by using > getObject, but I can't seem to make it work. Try this: --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ Zope maillist - [EMAIL PROTE

Re: [Zope] ZSQL-Methods: last inserted id

2000-05-17 Thread Jonothan Farr
> I wonder how I can find out about the last inserted id of a row in my > mysql-database, which I inserted through a ZSQL-Method... > > I tried mysql's built-in function LAST_INSERT_ID(), but that did not solve > my problem... It should. Create a DTML method called, say 'select_last_id': selec