Re: [Zope-dev] [ZODB-Dev] RFC: release persistent as a standalone package

2012-07-02 Thread Alan Runyan
 I would like to release a '4.0.0' version of the package, and switch
 the ZODB trunk to pull it in as a dependency (deleting the currently
 included (older) copy of persistent).  One possible issue is that I
 have not (yet) made the C extensions work under Python 3.2:  I don't
 know whether that should be a blocker for a release.

I do not believe its a blocker. That is a feature that could be added.

 Comments?

You rock.

-- 
Alan Runyan

Skype/Twitter:: runyaga
Office:: 713.942.2377 ext 111
http://ploud.com/  Plone site in less than 10 seconds
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Who has access to wineggbuilder was Re: zope.interface 3.8 win eggs

2011-09-24 Thread Alan Runyan
On Fri, Sep 23, 2011 at 1:35 PM, Chris McDonough chr...@plope.com wrote:
 On Fri, 2011-09-23 at 13:05 -0500, Alan Runyan wrote:
 please,
 can someone create 32/64bit eggs for windows

 I think someone needs to kick the wineggbuilder, or at least diagnose
 why it's having trouble building eggs for z.i.  I'm not sure who's meant
 to be running it.

Who has access to the wineggbuilder?
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Who has access to wineggbuilder was Re: zope.interface 3.8 win eggs

2011-09-24 Thread Alan Runyan
Thanks everyone!!

On Sat, Sep 24, 2011 at 12:59 PM, Adam Groszer agros...@gmail.com wrote:
 Great!

 On Sat, Sep 24, 2011 at 5:47 PM, Hanno Schlichting ha...@hannosch.eu wrote:
 On Sat, Sep 24, 2011 at 4:25 PM, Adam Groszer agros...@gmail.com wrote:
 Something is totally borked there.
 http://winbot.zope.org/builders/wineggbuilder/builds/13939/steps/release%20eggs/logs/stdio

 I took a look and fixed the problem. It came down to a missing version
 pin for BeautifulSoup and a new backwards incompatible 4.0b version of
 it.

 The missing binary eggs are build and uploaded as we speak.

 Adam: I also installed all the latest Windows security updates and
 restarted the server once for that.

 Hanno




 --
 Best regards,
 Adam

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] zope.interface 3.8 win eggs

2011-09-23 Thread Alan Runyan
please,
can someone create 32/64bit eggs for windows
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] zope.testrunner misleading output

2010-12-22 Thread Alan Franzoni
Hello,
I've tried submitting this as a launchpad answer but it expired
without further notice; I'm posting this here, I hope it's the right
place to discuss this.

I'm indirectly using zope.testrunner through zc.buildout zc.recipe.testrunner:

[testunits]
recipe = zc.recipe.testrunner
eggs = pydenji
defaults = [ --auto-color, -vv, --tests-pattern, ^test_.* ]

It works; but what happens if a test file matching the pattern has got
a serious failure, let's say an import or syntax error ?

Output:
Test-module import failures:

Module: pydenji.test.test_cmdline

 File 
/Users/alan/Dropbox/code/pydenji_release/pydenji/pydenji/test/test_cmdline.py,
line 13

  ^
SyntaxError: invalid syntax


Running tests at level 1
Running zope.testrunner.layer.UnitTests tests:
 Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
 Running:

[...] long test output [... ]

 test_resolver_retrieves_package_resource_filename
(pydenji.test.test_uriresolver.TestPackageResolver)
 Ran 73 tests with 0 failures and 0 errors in 0.188 seconds.
Tearing down left over layers:
 Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

Test-modules with import problems:
 pydenji.test.test_cmdline


I can't show you such things here, but the 73 is green, which is the
colour for all ok - if any failure happens, the colors turn red,
while the test modules with import problems are just a tiny line
after that, and often gets overlooked.

Also, a test file matching the pattern but which not defines any test
is treated the very same way as a file with import problems, which is
probably not what it want.

The issues I can find are:

- I need to dig to the top in order to get the traceback; other
frameworks, like twisted's own trial, print all the tracebacks at the
bottom of the test run for easy debugging;
- test colors should not turn green if any test with import problem is
around; maybe an import/syntax error should count as a generic error.
- while an import issue is a serious fact - meaning the test can't be
run, and should be reported, a test module which does not define any
test could just issue a warning - it could just be a placeholder test,
or a not-yet-finished test case, and should not be a blocking issue.

Any thoughts on this?


-- 
Alan Franzoni
--
contact me at pub...@[mysurname].eu
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope.testrunner misleading output

2010-12-22 Thread Alan Franzoni
On Wed, Dec 22, 2010 at 3:13 PM, Marius Gedminas mar...@gedmin.as wrote:

 It is reported near the beginning of the output (highlighted in red, to
 stand out), mentioned in the summary at the end to ensure you don't
 miss it, and the test runner exits with a non-zero status code (I hope;
 if it doesn't, that's a bug).

Yes, the status code is correctly set - I wasn't complaining about
that, the runner works fine in our CI system - but I usually don't
pipe || while running tests at the console.

Also, there's a bit of impedence between 0 failures and 0 errors
and the exit status 1. I mean, the first time it happened i thought
WTF?. I mean: it's very easy to associate red with something bad
occurred, I like that, and I'd like that to be extended.

Maybe something like


Ran A tests with B failures, C errors and D other problems


would satisfy us all.



 That's an interesting perspective.

 Note that even when there are failures, the number of tests and the
 number of seconds are highlighted in green.  (The colours there are
 mainly to make the numbers stand out so they're easier to notice in the
 output.)

Yes, you're right, it's just the number of failures that turns red, if any.

What I'd probably like is to have failed imports and syntax errors to
be counted as errors, while files defining no tests just as warnings.

 probably not what it want.

 What's it?

it = I , sorry, my typo.

 - I need to dig to the top in order to get the traceback; other
 frameworks, like twisted's own trial, print all the tracebacks at the
 bottom of the test run for easy debugging;

 Having used other frameworks, I appreciate zope.testrunner's eagerness
 to show me the traceback at once, so I can start examining an error
 without having to stare at an F in the middle of a sea of dots and
 wonder what it might be, while waiting 20 minutes for the rest of the
 test suite to finish running.

I realize zope.testrunner layering system is designed to run unit,
integration and maybe acceptance tests, which can be pretty consuming.
I usually run mostly unit tests, taking less than 2 seconds.

By the way you're describing nose behaviour, I think; twisted trial is
better at this; normally it just outputs the errors at the end, but if
the -e switch is passed, it prints the tracebacks both ASAP *and* at
the end. I guess a similar approach, using a switch, could be employed
in zope.testrunner.

 Then again I agree that having to scroll back to the first traceback is
 a necessity that's a bit bothersome.  I don't think printing the
 tracebacks at the end of the run would help, in case there were multiple
 tracebacks -- you'd want the first one anyway; the others likely being
 caused by it.  Also, tracebacks tend to be long, requiring me to scroll
 anyway.

If I'm running unit tests there's no certain connection between
tracebacks, and most probably there's no definite first. Again,
probably a configurable switch would make everybody happy :-)


 - while an import issue is a serious fact - meaning the test can't be
 run, and should be reported, a test module which does not define any
 test could just issue a warning - it could just be a placeholder test,
 or a not-yet-finished test case, and should not be a blocking issue.

 An import error could be a placeholder as well.  What makes a module
 with no tests different?  If you added a module, it's reasonable to
 assume you added it for a reason, and what other reason could there be
 other than for it to have tests?

An import error is surely an error; if it can't be imported it can't
work in any way. The file might define 100 tests, and those are not
run.

A syntax error is surely an error as well; if written with the correct
syntax there might be tests inside, and they won't get executed.

A file defining no tests may be an error, but you can never be sure;
hence I think you should tell the user but you shouldn't fail by
default, IMHO.


NB:
if any of my proposal is accepted, I'm willing to contribute a patch,
I just don't want to start coding for something that might later just
be trashed.


-- 
Alan Franzoni
--
contact me at pub...@[mysurname].eu
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How to install a ZEORaid storage.....

2010-12-10 Thread Alan Runyan
 I am new to MySQL and relStorage. I am not sure whether this is the
 right place to ask this question or not.
 I used relStorage with mySQL cluster. But MySql cluster replicates the
 tables only with engine=ndbcluster, while relStorage creates tables
 having engine=InnoDB. I manually altered the tables engine from InnoDB
 to ndbcluster, but after doing this relStorage throws exception,
 object_state table should have engine=InnoDB, it has engine
 =ndbcluster. Do anyone have any idea about to make mysql cluster
 working with relStorage.

do not use ndbcluster engine.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How to install a ZEORaid storage.....

2010-12-10 Thread Alan Runyan
 what are other options for mysql database redundancy on windows ?

http://dev.mysql.com/doc/refman/5.0/en/innodb-and-mysql-replication.html

use the google, luke
mysql replication innodb
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 2.12 20% slower than Zope 2.9?!

2010-10-11 Thread Alan Runyan
 Try with a smaller batch (whatever you are doing) and profile it.


I 100% agree with what ajung says.  post a profile of your batch run
that takes ~30 minutes.

I would suspect its probably something inside framework you are using
which is constantly querying ZCA.

-alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] adapter registry in other systems

2010-10-05 Thread Alan Runyan
 i've read martin's article
 http://www.martinaspeli.net/articles/a-java-component-architecture,
 where he mentions that java doesn't have an equivalent of zca's adapter
 registry. The article was written in 2007, so I was wondering if this
 still holds true? What about other platforms, maybe .NET?

jure,

my understanding is that OSGi comes pretty close to the ZCA
in spirit.

http://en.wikipedia.org/wiki/OSGi

cheers
alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 2.12/trunk on Windows

2010-09-28 Thread Alan Runyan
On Tue, Sep 28, 2010 at 6:09 AM, Martin Aspeli optil...@gmail.com wrote:
 What bugs? We're seeing problems running zope as  Windows services.
 Wondering if this is related.

Nikolay can give more detail.  Zcatalog and acquisition need to be
re-released (changes were applied yesterday) to fix overflow errors.

alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope 2.12/trunk on Windows

2010-09-27 Thread Alan Runyan
Hi guys,

we have 4 new builders coming online.
zope-2.12 win32/amd64
zope-trunk win32/amd64
https://hudson.enfoldsystems.com/

We found some bugs 64bit zope/windows
bugs and patches will be applied by tomorrow.

cheers
alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] ZODB Documentation Fundraising

2010-06-24 Thread Alan Runyan
The blog: http://zodbdocs.blogspot.com/

I am coordinating an effort to have a ZODB book written by one of our
Zope clan, Carlos de la Guardia. He has completed a recent book for
Packt publishing on Grok.  He showed interested in writing a ZODB book
if it were under Creative Commons.  I have set up a blog and focused
on behind-the-scenes coordination required to make the book happen.

We are now at a point where:

- There is an initial outline of topics to cover.
- There is a way to contribute financially on the ZODB Docs Blog
(through paypal).
- If you can contribute to the book with written material and
experience.  Let me know.  I will make a contributor on the blog and
you can post articles.  Carlos is more than happy to consolidate/pinch
material (and of course give the original author credit) and put it
into the final book.  One of the thoughts would be to write ZODB
mini-howtos/articles on the blog.  Some initial ideas: transaction
module (datamanagers, aftercommithook, etc), debugging scenarios (how
to debug a record being mutated accidentally), conflict resolution
(writing your own custom impl, btree bucket splits, etc), concurrency,
any benchmarking information you have, relstorage, writing your own
persistence format (keas.pbpersist?), or query strategies for ZODB.
There is a lot of material to cover in this book.
- There are also contribution/funding levels available which correlate
to recognition of your donation in the book.  That is right.  Give
money and you go down in history in the documentation *wink*

We will have a revised outline of the book by Monday evening from
Carlos.  If you want to contribute material to the Blog -- let me
know.  You have a channel to  voice your experience.

More information is on the blog and will be updated as more progress
is made. Again the blog is at, http://zodbdocs.blogspot.com/ -- please
sign up and subscribe to the RSS feed.

I am open for any feedback.  I desperately want to get the larger
community support and feedback early as possible.  Please feel free to
send comments, concerns, criticisms.

cheers,
alan runyan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] NEO High Performance Distributed Fault Tolerant ZODB Storage

2010-03-31 Thread Alan Runyan
On Wed, Mar 31, 2010 at 3:32 AM, Vincent Pelletier vinc...@nexedi.comwrote:

 Hi,

 I would like to present you the NEOPPOD project, aiming at improving ZODB
 Storage scalability. The implementation is in a rather good shape, although
 it
 fails at a few ZODB tests at the moment (they are currently being worked
 on).
 Scalability is achieved by distributing data over multiple servers
 (replication and load balancing) with the ability to extend/reduce cluster
 on-line.


Congrats!

A few questions that you may want to add in a FAQ.

  - NEO replaces FileStorage? Maybe typo?
  - What is the gain of using NEO over relstorage + mysql replication?
  - Why not include ZODB 3.10/Python 2.6 as a goal of the project?
- I understand *today* the technologies use python 2.4 but
  ZODB 3.10/Plone 4/Zope 2.12 use python 2.6
  - NEO is a different protocol than ZEO?
  - What is the Blob story with NEO?
  - Any issues with 32bit vs 64bit
  - Backup/restore strategy of NEO

Other notes:
  - Maybe explain the goal of the project clearer:

NEO provides distributed, redundant and transactional storage designed
for petabytes of persistent (python?) objects.

  - A buildout for NEO would lower bar for evaluation
  - How do you plan on storing petabytes in a single MySQL server?  since
that is the data structure backend for NEO?

Looking forward to reading the petrinet article - please send update when
it comes out.

cheers
alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Uses of the ZTK and how it relates to management

2010-03-04 Thread Alan Runyan

 One thing that makes problems like this really hard is that email is such
 a terrible tool for much of the needed communication.  It would be nice
 if we could do something more sprinty.  I don't want to help if it involves
 drawn out email discussions, but, FWIW, I'd be willing to allocate some
 concentrated blocks of time for high-bandwidth discussion and work.


Fortunately there are all sorts of free/cheap ways for high bandwidth
communication.  Maybe a free conference call + screen sharing.
If there was an agenda -- I would be more than willing to schedule,
ensure technology is working,  and coordinate people being there.

Some people in the plone community have been doing weekly sprints.
They just completed their 27th weekly sprint.  They spend 6 hours or
so on a set of bugs in the issue tracker.  They do it over #irc.  By
this is still lowbandwidth communications.  Nothing better than
voice + supporting visuals to increase effectiveness.

Again if someone wants to setup agenda I can help w/ logistics and
ensure voice/screen sharing will work for, say, 20-40 people.

Unfortunately I know very little about ZTK and the dependency issues.
I would not be good person to setup an agenda.

cheers
alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] ContainerOrderModifiedEvent

2009-03-19 Thread Alan Runyan
It looks like zope.container.contained.notifyContainerModified is the
event that is sent when *any* container modification occurs.  Maybe
this is too coarse grain?  I would like to be able to differentiate
when Ordering changes take place on a container.

Are there any complaints against having ordering signal a more
specific event?  i.e. ContainerOrderModifiedEvent?
It would inherient from ContainerModifiedEvent.

specifically in:
  - zope.container.ordered.updateOrder
  - OFS.Folder.OrderSupport

The problem is that it is very difficult to know if the Order has
changed vs. some other container attribute has been changed.

-- 
Alan Runyan
Enfold Systems, Inc.
http://www.enfoldsystems.com/
phone: +1.713.942.2377x111
fax: +1.832.201.8856
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Remove 'Add Product' in Control_Panel

2009-01-23 Thread Alan Runyan
While we are talking about removing zclasses (or rather.. ignoring them).
Can we remove the Add Product button in the Control Panel?

Removing buttons in the ZMI is a good thing ;)

-- 
Alan Runyan
Enfold Systems, Inc.
http://www.enfoldsystems.com/
phone: +1.713.942.2377x111
fax: +1.832.201.8856
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] catalog performance: query plan

2008-10-27 Thread Alan Runyan
I agree with Tres.  A lot more can be done with Indexes and Catalog
without caching.

The most exiciting development in Catalog optimizations comes out
Jarn.  Helge Tesdal (iirc) did a buncha work  at a RDBMS company when
he was in college.  He has a protoype of a query plan for ZCatalog.

http://www.jarn.com/blog/catalog-query-plan

I would like to ask Roche and others to look at the Query Plan.

Caching is a total PITA because invalidation machinery becomes
overwhelming complex and unwieldly quickly in production.

-- 
Alan Runyan
Enfold Systems, Inc.
http://www.enfoldsystems.com/
phone: +1.713.942.2377x111
fax: +1.832.201.8856
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Bounty for Breaking RestrictedPython?

2008-10-24 Thread Alan Runyan
So maybe we could crowd source the RestrictedPython problem?
If we could create a pool of money from various people/organizations.
And offer someone 50$ per scenario where they can break Restricted
Python?  Then it turns into sort of a game.  Not only do you get
bragging rights but some money (or something from Amazon).

-- 
Alan Runyan
Enfold Systems, Inc.
http://www.enfoldsystems.com/
phone: +1.713.942.2377x111
fax: +1.832.201.8856
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope2 monitoring

2008-04-30 Thread Alan Milligan

Hi,

We use monit - it has the advantage that you can specify resource limits 
and if/when zope breaches these (or it barfs), monit auto-restarts the 
server ;)


Alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope] a warning message before performing an action

2007-06-14 Thread Alan

Dears,

I have a web page with some buttons (form action=...) to perform some
action (by calling a python script). However, some actions (like
'delete' a picture for example) I would like to warn user before
performing it. I recall from php how to pop up a window (or a drop
down in Mac OSX) with a warning message prompting a 'Yes' or 'No'
confirmation and I was wondering how would I do it with Zope, with an
example if possible.

Any help here would be very welcome.
Cheers,

Alan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] help with detecting mime_type

2007-05-24 Thread Alan

Dears,

In my external method I can get mime_type =
file.headers.headers[1].split()[1] and then my code proceed based on
which mime type was identified for the file uploaded.

What happens now is that a user uploading a tgz file from a Windows
platform and then my code did not identify it as a
application/x-gzip-compressed or similar (it gets
application/octet-stream).

As far as I understood from this case, such mime type info is passed
by user's system (where Windows usually is not aware of tar.gz, tgz
etc format) rather than being set by zope server.

So since I was not aware of that, my question is: does anyone know a
better and reliable way of identifying a file mime type (or a file
format) independent from which platform/browser it is submitted?

I realise I can use a conditional for checking extension file name in
addition to mime type detection. But I would go for that only if I
cannot find anything fairer.

Many thanks in advance.

Alan

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] Re: Killer App for ZClasses

2007-04-19 Thread Alan Milligan

Christopher Lozinski wrote:

I do have an accounting application I want to bring up quickly, and this 
seems to me the fastest way to bring it up, but also

to have an upgrade path to the future.
We do http://www.last-bastion.net/BastionLedger which is a full double 
entry general ledger with an entire order management workflow suite with 
skinnable order/invoice forms.


Just download it and install it.

Alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope] about LocalFS

2007-04-02 Thread Alan

Dears,

Just checking and maybe looking for some advices.

My application in Zope depends on LocalFS. I want to make my
application reproducible at other Zope servers. My question is if
LocalFS is still maintained and under developed and if so is there any
other version newer than
http://www.easyleading.org/Downloads/LocalFS-1.7rc1-andreas.tar.gz/view?

In order to still use LocalFS I need to hack in its code and it's not
such a thing I would like to request to another user to do if he/she
wants to do my application.

If I have to move from LocalFS, which other product would replace it
keeping at least LocalFS features?

Many thanks in advance.

Regards,
Alan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: presenting content in Zope generated outside

2007-03-29 Thread Alan

Hi Laurence, thanks a lot for your help.

I studied the examples and other programs and did a sort of solution
to my problem based on iFrame.

Besides, it's always fun to know something new about zope.

Thanks again.

Cheers,
Alan


Date: Mon, 26 Mar 2007 16:58:05 +0100
From: Laurence Rowe [EMAIL PROTECTED]
Subject: [Zope] Re: presenting content in Zope generated outside

Hi Alan,

I had a similar requirement a few years ago and wrote it up here:
http://plone.org/documentation/how-to/integrate-external-content/

Reading the comments it seems as if someone has made it into a product.
There is also a product called Windowz which uses iframes:
http://plone.org/products/windowz

And yes, zope will work with frames (they're just html).

@import is css not html. You need xslt to do that sort of thing with xhtml.

Hope that helps,

Laurence


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] presenting content in Zope generated outside

2007-03-26 Thread Alan

Dears List-mates,

I have a program that process some data analysis and it's able to
generate html docs to be visualised in a web browser.

What I am trying to figure out is a way of wrapping this external html
docs inside Zope/Plone. Trying to explain it better: I would like to
present such data analysis results (and for that I can play with its
code in order to generate just the body block for example) as if it
were part of our plone website, i.e. using our website's layout with
its header and side columns etc.

That external data (and html doc) is accessible via LocalFS among
others reasons because they are big and temporary.

I am aware of importing html via FTP or webdav or even considering to
code a python external method to generate the data analysis results
independently of my external program, but I guess these approach
involves using a lot of ZODB resources, besides processing time, that
frankly I would like to avoid. Accessing data via LocalFS or similar
and just turn them presentable inside a zope website seems to be the
natural way, but I am missing how to do it.

I thought about using frames, but it sounds even worse. BTW, is Zope
able to work with frames?

Another possibility I imagined was if I could fill my external html
files with '!-- @import ...' inside e.g. head block, but I really
don't know how far I can go with that idea, since my first tests
showed me that it can works for font style (*.css files) but then I
don't know what else to do, for example, to get the side menu and
calendar.

Anyway, any commentary here would be very appreciated. Sorry if I
couldn't express me better but I am prone to extend any point here if
you wish.

I thank very much in advance any help.

Cheers,
Alan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: open image in a fitted new window

2007-03-23 Thread Alan

Thanks Tres and Tino.

BTW Tino, what do you mean with

...or uses layers the big view on top with little DOM action (preferred)...

something like passing the mouse point over the picture and have the
full-size version of the image?

Cheers,
Alan

On 22/03/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Tres Seaver schrieb:
...
 The only trick here is to get the javascript to include the dynamic
 URL;  everything else is not specific to Zope or ZPT.  Here is the hack
 I usually use for that::

   !-- assumes that 'image' is bound to an actual Zope image object --
   script type=text/javascript lang=JavaScript
   tal:define=img_url image/absolute_url
   tal:content=string:var img_url='${img_url}';/script

 Your popup javascript can then refer to the 'img_url' JS variable to set
 the window location.


A little bit cleaner approach would be to have an ordinary link:

a class=magnify href=path/to/big/imageimg src=path/to/thumbnail
width, height ... //a


and have a general javascript which scans thru the DOM after load,
finds the a-objects with class-attribute magnify and installs
an handler for mouse click which overrides the usual link action
and either pops up a window or uses layers the big view on top
with little DOM action (preferred). You dont even net buzzy Ajax
for this. The URL for the big picture is just encoded in the HTML
already, so you can use the usual tal: attributes to define in
ZPT.

The result is clean xhtml code which works in any case and only
is improved in case of javascript beeing available.

Regards
Tino

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] open image in a fitted new window

2007-03-22 Thread Alan

Dears,

I was wondering how to once clicking on a image (thumbnail) I would
get the full-size image in a fitted new window, without buttons,
address field etc. I can realise how to do it with javascript but I
don't know, if it's the only way, how to integrate javascript in a
zpt. A example/tutorial would be very welcome so.

If it can be done without javascript, just with zope tools, that would
be very appreciated.

Many thanks in advance.
Cheers,
Alan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] open image in a fitted new window

2007-03-22 Thread Alan

The answer to your question is Yes if there's no other way of clicking
on a link and open an image in a fitted new window of my browser that
zope can cope without using javascript.

But putting in other words what I really would like to know: does zope
have its own way of clicking on a link and open an image in a fitted
new window without buttons, address field etc.?

Cheers,
Alan

On 22/03/07, Maciej Wisniowski [EMAIL PROTECTED] wrote:


 I was wondering how to once clicking on a image (thumbnail) I would
 get the full-size image in a fitted new window, without buttons,
 address field etc. I can realise how to do it with javascript but I
 don't know, if it's the only way, how to integrate javascript in a
 zpt. A example/tutorial would be very welcome so.
What you're asking for? How to insert javascript code into html page?

--
Maciej Wisniowski




--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] open image in a fitted new window

2007-03-22 Thread Alan

Thanks Jonathan, I can understand your point. So I will google for a
way (example/tutorial) of how integrating javascript in a zpt.

Cheers,
Alan

On 22/03/07, Jonathan [EMAIL PROTECTED] wrote:


- Original Message -
From: Alan [EMAIL PROTECTED]
To: Maciej Wisniowski [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Thursday, March 22, 2007 9:01 AM
Subject: Re: [Zope] open image in a fitted new window


 The answer to your question is Yes if there's no other way of clicking
 on a link and open an image in a fitted new window of my browser that
 zope can cope without using javascript.

 But putting in other words what I really would like to know: does zope
 have its own way of clicking on a link and open an image in a fitted
 new window without buttons, address field etc.?

Zope only performs server-side actions.  What you are describing are actions
that occur on the client-side (ie. on the user's pc/browser), therefore you
must use client-side tools (ie. javascript).


Jonathan





--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] user attributes

2007-02-13 Thread Alan

Dears,

I have in a external method

user = REQUEST.AUTHENTICATED_USER

And so I can get user.getUserName(), user.getAllGroupNames() but I
cannot find how to get user's full name and user's e-mail. Any idea?

Many thanks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] External Method importing modules

2007-02-13 Thread Alan

Dear List,

I have an external method and now I developed I new module in a
separated file and then I am trying to make my external method to
import it but I am failing here. Where should place my module file in
order to be found by my external method?
I tried to place it in the same folder of my external method, but no success.

Any help would be very appreciated. Many thanks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] External Method importing modules

2007-02-13 Thread Alan

Thanks Andreas, I am trying with:

if sys.path.count(myPath) == 0: sys.path.insert(0, myPath)

where myPath should be '[Zope installation folder]/instance/import'.
So my question now is: is there a variable inside Zope which can
returns the 'import' path?

Many thanks in advance.

Cheers,
Alan

On 13/02/07, Andreas Jung [EMAIL PROTECTED] wrote:



--On 13. Februar 2007 12:53:25 + Alan [EMAIL PROTECTED] wrote:

 Dear List,

 I have an external method and now I developed I new module in a
 separated file and then I am trying to make my external method to
 import it but I am failing here. Where should place my module file in
 order to be found by my external method?
 I tried to place it in the same folder of my external method, but no
 success.

Since the module must be importable, it must be available in some location
as defined through sys.path or $PYTHONPATH. Check the Python docs for
additional info on that topic.

-aj




--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] External Method importing modules

2007-02-13 Thread Alan

Well, I did it:

from App.config import getConfiguration
extPath = getConfiguration().instancehome+'/Extensions'
if sys.path.count(extPath) == 0: sys.path.insert(0, extPath)

And it worked for what I wanted.

On 13/02/07, Alan [EMAIL PROTECTED] wrote:

On 13/02/07, Andreas Jung [EMAIL PROTECTED] wrote:
 What's the sense of this code? sys.path is usually *never* empty.
 You should really look at the Python docs and learn where Python is looking
 by default for modules. Is is perfectly documented - python.org -
 documentation.

 In addition you would like to check for the existence of an item in
 sys.path using

  if myPath in sys.path:

Dear Andreas and Jonathan, first a mistake: I want to access
'Extensions' folder as you mentioned Jonathan, not 'import'.

Andreas, I've done that, I can see several path there like
.../instance/Products/Sprout/src, .../lib/python/Zope2/Startup etc.,
but none for .../instance/Extensions.

I was hoping that I could get the path where 'Extensions' is because I
work with several zope installations in several platforms and I would
like to make my module independent of a variable inside its code that
should be manually adjusted for every situation.

And yes, I am aware about adding the path only once (that's why
there's a 'if') and then I avoid recursive insertions.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
http://www.bio.cam.ac.uk/~awd28




--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-08 Thread Alan

Thanks Dieter,

We use Plone 2.1.2, Zope (Zope 2.8.5-final, python 2.3.5, sunos5),
Python 2.3.5 (#1, Feb 14 2006, 10:51:41) with

LocalFS-1.7rc1-andreas.tar.gz modified
(#from OFS.content_types import find_binary
 from zope.app.content_types import find_binary)

It was working before we switched to apache. So I took a look at
LocalFS code and then I commented out line 66 (#
ITERATORS_PRESENT=1) forcing LocalFS to work without module
StreamingFile (from LocalFS). And Hallelujah! it solved our problem.

However, why Zope is not able to cope with filestream_iterator
anymore? What happened here since we only switched zope to apache? And
what we are loosing since I am not using filestream_iterator anymore?
A sort of performance?

Anyway, is there any new version of LocalFS to be downloaded?

Many thanks to you all guys.
Cheers,
Alan

On 07/01/07, Dieter Maurer [EMAIL PROTECTED] wrote:

Alan wrote at 2007-1-5 10:32 +:
 ...
If I try to download a file bigger than 128 kb, I got a smaller file
and when I 'cat' it I got the 'object' (like open file
'/scratch/ccpngrid/JOBS/PDBS_all.pdb', mode 'rb' at 0x323c7558)

Modern versions of LocalFS return a string for files
smaller than 128 kB and a filestream_iterator for larger files.

Of course, this requires a Zope version that already supports
filestream_iterators.

Apparently, your Zope version is too old for the LocalFS version
you are using.


You may upgrade your Zope, downgrade your LocalFS or
modify your LocalFS copy to always return a string.



--
Dieter




--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] Limit size download file in Zope wih LocalFS

2007-01-05 Thread Alan

Thanks Andrea for your attention.

Not clear error message.

If I try to download a file bigger than 128 kb, I got a smaller file
and when I 'cat' it I got the 'object' (like open file
'/scratch/ccpngrid/JOBS/PDBS_all.pdb', mode 'rb' at 0x323c7558)

Playing with the browser mode of LocalFS (tab 'View' in ZMI) I can
upload big files but I get the same problem as above when downloading.

The first thing I did was to ask to our server administrator and so
far she told me nothing was done but migrating our portal to apache,
yet she pointed out the fact that everything else is working but
LocalFS, then the likely culprit is LocalFS... Anyway, it was working
before...

Cheers,
Alan

On 04/01/07, Andreas Jung [EMAIL PROTECTED] wrote:

- --On 4. Januar 2007 17:52:07 + Alan [EMAIL PROTECTED] wrote:

 Hi List!

 I got a problem. I found out that any file located in a LocalFS folder
 bigger than 128 Kb (precisely 131071 bytes) cannot be download from
 zope portal since the administrator move it over apache.

 I mean, I can download a pdf file of 8 Mb from Plone, but I cannot
 download
 any file from a LocalFS area bigger than the value above.



Any particular error message? Your administrator might have limited
the size for POST requests?

- -aj

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Limit size download file in Zope wih LocalFS

2007-01-04 Thread Alan

Hi List!

I got a problem. I found out that any file located in a LocalFS folder
bigger than 128 Kb (precisely 131071 bytes) cannot be download from
zope portal since the administrator move it over apache.

I mean, I can download a pdf file of 8 Mb from Plone, but I cannot download
any file from a LocalFS area bigger than the value above.

This issue sounds very unusual to me and I am not completely sure if I
am reporting fine, specially because I am not the zope server
administrator, I just have a plone account to develop a product.

I hope someone else can help me here, any hint would be very welcome.
Many thanks in advance.

Cheers and Happy New Year 2007.
Alan

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28



--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] the name of the 'user' running zope

2006-11-09 Thread Alan

Hi dears,

Is there a way (method or attribute) of getting the string for the
'user' running zope?

Many thanks in advance.
Alan
--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] Mime type for PDB files

2006-11-02 Thread Alan

Hi Andreas,

That's solve my problem.

Cheers,
Alan

On 01/11/06, Andreas Jung [EMAIL PROTECTED] wrote:



--On 1. November 2006 04:56:28 + Alan [EMAIL PROTECTED] wrote:

 Hi List!

 I have some lines in a ZPT file creating a link to PDB files in a
 LocalFS folder:

 span tal:repeat=item python: options.get('pdbsw','null')
 trtd
 a tal:attributes=href python:
 container.JOBS.absolute_url()+'/'+item+'.pdb' tal:content=python:
 item+'.pdb'get file/a
 /tdtd
 /span

 It works fine expect for one thing. When clicking at the link, my
 browser (Safari), thinks my PDB file has mime type text.

 Is it possible to define the mime type (chemical/x-pdb) for my linked
 files in Zope?


For 'File' instances you can set the 'content_type' property within the ZMI.

-aj





--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Mime type for PDB files

2006-11-01 Thread Alan

Hi List!

I have some lines in a ZPT file creating a link to PDB files in a
LocalFS folder:

span tal:repeat=item python: options.get('pdbsw','null')
trtd
a tal:attributes=href python:
container.JOBS.absolute_url()+'/'+item+'.pdb' tal:content=python:
item+'.pdb'get file/a
/tdtd
/span

It works fine expect for one thing. When clicking at the link, my
browser (Safari), thinks my PDB file has mime type text.

Is it possible to define the mime type (chemical/x-pdb) for my linked
files in Zope?

I would thank any attention in advance.

Regards,
Alan

--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] listing files in a LocalFS folder

2006-10-26 Thread Alan

Hi List!

I am doing that:

ul
  li tal:repeat=item context/objectValues
a href=ABSOLUTE_URL
   tal:attributes=href item/absolute_url
   tal:content=item/title_or_idSUB-OBJECT TITLE OR ID/a/li
/ul

And it works to list the content of my main folder.

Within my main folder, there's a LocalFS folder (let's call LFSfolder).

When using the code above and I can even click in LFSfolder and access
its content.

However, what I want is:
li tal:repeat=item context/LFSfolder/objectValues
   ^^
and link the content inside LFSfolder. But it does not work.

Does anyone know a way of doing what I want?

Many thinks in advance.
Cheers,
Alan
--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] external method: importing and updating method

2006-10-05 Thread Alan

Hi List,

crontab is really a bad idea. We quitted that.

Thanks for your commentaries.

Alan

On 05/10/06, Chris Withers [EMAIL PROTECTED] wrote:

Alan wrote:
 Thanks for help. I did what suggested below. We also set a crontab to
 restart the zope server every night,

Why?!

Chris

--
Simplistix - Content Management, Zope  Python Consulting
- http://www.simplistix.co.uk





--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] external method: importing and updating method

2006-10-04 Thread Alan

Hi Folks,

Thanks for help. I did what suggested below. We also set a crontab to
restart the zope server every night, but them I was wondering if it is
a good idea.

Cheers,
Alan

On 03/10/06, Jonathan [EMAIL PROTECTED] wrote:


- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Alan [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Tuesday, October 03, 2006 2:06 PM
Subject: Re: [Zope] external method: importing and updating method


 Alan wrote at 2006-10-2 18:48 +0100:
In my external method I have something like this:
...
sys.path.insert(0, CCPNPYTHON)

 This is not a good idea!

 The source of an External Method can be read arbitrarily often --
 and each time, you extend sys.path...

We get around this 'evergrowing' path problem by (if there is a problem with
this solution let me know!):

import sys
SOMEPATH = '/some/path/goes/here'
if SOMEPATH not in sys.path:
sys.path.append(SOMEPATH)


Jonathan






--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] external method: importing and updating method

2006-10-02 Thread Alan

Hi List!

In my external method I have something like this:
...
sys.path.insert(0, CCPNPYTHON)
from memops.general.Io import loadXmlProjectFile
...

the problem I am facing now it that if I update my memops stuff (which
is found in CCPNPYTHON path) it seems not to be being updated in Zope,
because Zope is still using the old version. (If I run outside Zope,
the code works).

And yes, I saved the external method in Zope FS. So, what else may I be missing?

Many thanks in advance.

Cheers,
Alan
--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] a LocalFS that works

2006-09-14 Thread Alan

Hi list,

I am playing with two Zope servers version:

Zope 2.9.3-, python 2.4.2, darwin
and
Zope 2.8.5-final, python 2.3.5, sunos5

My problem is where to find a LocalFS that works? I tried version 1.0,
I patched it, but it didn't work. I also saw things like
LocalFS-1.3-andreas.tar.gz (even 1.7!) but from 2004/2005 or
PloneLocalFS (or now PloneSingleLocalFS!), but alpha. To summarize, I
am lost.

A link would be very welcome. Thanks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] a LocalFS that works

2006-09-14 Thread Alan

Thanks Dennis,

I couldn't find the version you mentioned but I got that:

http://www.easyleading.org/Downloads/LocalFS-1.7rc1-andreas.tar.gz/view

and I had to do this in LocalFS.py:
#from OFS.content_types import find_binary
from zope.app.content_types import find_binary

And it worked in my  Zope 2.9.3-, python 2.4.2, darwin.

Does anyone know if the either the patched version above will work
with Zope 2.8.5-final, python 2.3.5, sunos5? I am not the admin there
and I just want to save her time having problems if I request her such
Product to be installed.

Cheers,
Alan


On 14/09/06, Dennis Allison [EMAIL PROTECTED] wrote:


Alan,

We use LocalFS-1.7-andreas.tar.gz with some local extensions with Zope
2.9.X. I would recommentd that you use it.  The andreas LocalFS series
is needed for the more recent Zopes.


On Thu, 14 Sep 2006, Alan wrote:

 Hi list,

 I am playing with two Zope servers version:

 Zope 2.9.3-, python 2.4.2, darwin
  and
 Zope 2.8.5-final, python 2.3.5, sunos5

 My problem is where to find a LocalFS that works? I tried version 1.0,
 I patched it, but it didn't work. I also saw things like
 LocalFS-1.3-andreas.tar.gz (even 1.7!) but from 2004/2005 or
 PloneLocalFS (or now PloneSingleLocalFS!), but alpha. To summarize, I
 am lost.

 A link would be very welcome. Thanks in advance.

 Cheers,
 Alan



--





--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZPT based on files in local filesystem folder

2006-09-13 Thread Alan

Hi List,

I've been googling, maybe LocalFS is a solution, but I would like to
listen a second (or more) opinion.

I would like to have a ZPT showing images and links for files that are
not within Zope filesystem, indeed they are in my local filesystem
(they are created by an Unix program btw).

So I am looking for something that may import my local folder and/or
the files inside to Zope space where a ZPT can work with.

For the moment, I would be more insterested in a external method or
similar rather than LocalFS or any other product that I have to
install in my zope server.

Any commentary or advice would be very welcome.

TIA,

Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Dictionary in ZPT

2006-09-12 Thread Alan

Dears,

I am looking for help.

I want to pass, when submitting a FORM from a page template, dictionary.

I started with that:
tal:define=global count python: 0; global data python: {}
...
and I would like to do something like:
 tal:define=global data['jname'] python: jname
or
 tal:define=global null python: data['jname']=jname

But I get only error.

Is there a way of creating and increasing a dict inside Zope template page?

Many thanks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] passing *args to external method

2006-09-12 Thread Alan

Hi List!

I've been trying without success to pass from a form in ZPT to an
external method an undefined list of parameters (*args).

An example:

def external_method(var_fix,*args):
  return 'Vals',var_fix,args
...
file _sub_html_:

FORM ACTION=external_method METHOD=POST ENCTYPE=multipart/form-data

input type=text name=var_fix value=
input type=hidden name=arg1 value=test1
input type=hidden name=arg2 value=test2

INPUT TYPE=SUBMIT VALUE=Submit
/FORM

returns typed value for var_fix and () for args. However, if I do:

def external_method(var_fix,arg1,arg2,*args):
 return Vals,var_fix,arg1,arg2,args

it returns values of arg1 and arg2. But my problem is that the number
args cannot be fixed since such arguments depends on other page.

I hope one can understand it. And I'd appreciate very much any attention.
Many thanks in advance.

Cheers,
Alan
--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Killing children process

2006-09-07 Thread Alan

Hi List!

Maybe it is more a question about python, but here it goes...

I have an application in Zope which spawns a process (1) in
background, a python program by the way. I monitor the process (1) via
the PID returned.

Embedded in (1), it uses os.system to run an application (2) which
does the real job. (2) is a bash script with several embedded
programs.

However, sometimes I need to kill (1) (os.kill), and I hopped when
killing (1), (2) and any of its children should be killed as well. But
it does not happen; system (PID 1) inherit (2).

I know if I were able to keep a list of any children and grandchildren
process I could kill all of them smoothly, however for such a list I
have no idea of doing it but:
a)- doing a program to track them via unix command 'ps' output (maybe
not reliable);
b)- changing the code of the 3rd party programs (not really a good idea at all).

All interaction are done via portal made in Zope.

So, if someone could give any idea of how tackle with this problem,
mainly avoiding a) and b), I would appreciate a lot.

To simplify, I would like to know if python is able to kill a process
and its 'family' without much hassle, and if so, how?

Many thanks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] download a file in a specific folder in the filesystem

2006-08-24 Thread Alan

Dears,

I would to know how to download a file generated by a program outside zope.
I mean, I would like to download a file via zope webserver and such a
file is located outside the zope space. Since zope treats everything
as a object I have know idea of how importing the link to a file
inside zope space.

I would thank in advance any help.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] download a file in a specific folder in the filesystem

2006-08-24 Thread Alan

Hi! Thanks for your replies.

But for what I want LocalFS or ExtFile sounds too much, specially
because I just need to download. Either, I did not realise yet well
what Richard purposed... However, I tried that:

with a external method
  fname = os.path.join(jobdir,'results.zip')
  file = open(fname,'rb').read()
  return file

but instead of having the file downloaded, it is printed in my
browser, as if it was a ascii file. I guess I need to add a mime type
property here, but I am running out of ideas.

Any commentary would be very welcome.
Cheers,
Alan

On 24/08/06, Richard Phelps [EMAIL PROTECTED] wrote:


If you just want the file to be downloadable from say a web page served by
zope you could make an object on your zope system (say a page template) that
renders a page with a link to the file you wish to make available. The file
would have to accessible to your web server.



On 24 Aug 2006, at 16:00, Alan wrote:


Dears,

I would to know how to download a file generated by a program outside zope.
I mean, I would like to download a file via zope webserver and such a
file is located outside the zope space. Since zope treats everything
as a object I have know idea of how importing the link to a file
inside zope space.

I would thank in advance any help.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.


http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Richard Phelps

Senior Lecturer in Nephrology

Renal Autoimmunity Group,

MRC Centre for Inflammation Research,

The Queen's Medical Research Institute

47 Little France Crescent

Edinburgh

EH16 4TJ

Tel (44) 131 242 9164

Fax (44) 131 242 9168




--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28



--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: Re: [Zope] download a file in a specific folder in the filesystem

2006-08-24 Thread Alan

Thanks a lot guys, it's working fine.

elif (func == 'Download'):
  fname = os.path.join(jobdir,'results.zip')
  file = open(fname,'rb').read()
  self.REQUEST.RESPONSE.setHeader('Content-Type', 'application/zip')
  return file

Cheers,
Alan

On 24/08/06, Gabriel Genellina [EMAIL PROTECTED] wrote:

At Thursday 24/8/2006 12:52, Alan wrote:

But for what I want LocalFS or ExtFile sounds too much, specially
because I just need to download. Either, I did not realise yet well
what Richard purposed... However, I tried that:

with a external method
   fname = os.path.join(jobdir,'results.zip')
   file = open(fname,'rb').read()
   return file

but instead of having the file downloaded, it is printed in my
browser, as if it was a ascii file. I guess I need to add a mime type
property here, but I am running out of ideas.

Exactly.
Something like:
REQUEST.RESPONSE.setHeader('Content-Type', 'application/zip-compressed')
(uhm, not sure of the right spelling)
And return the file object, not its contents. The publisher takes
care of sending it on chunks if needed.



Gabriel Genellina
Softlab SRL





__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas






--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] autorefresh a web page every x minutes

2006-08-04 Thread Alan

Dears,

Is there a way of doing a particular page template (ZPT) keeping
reloading/refreshing itself every x minute?

I hope so. Any help would be very appreciate. Many thinks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] autorefresh a web page every x minutes

2006-08-04 Thread Alan

Thanks a lot!

Cheers,
Alan

On 04/08/06, Joerg Baach [EMAIL PROTECTED] wrote:

Hi Alan,

 Is there a way of doing a particular page template (ZPT) keeping
 reloading/refreshing itself every x minute?

head
meta http-equiv=refresh content=42; template_id
/head

replace 42 with the number of secs to refresh, template_id with the id
of the ZPT.

or do a

meta http-equiv=refresh
  tal:attributes='content string:42;; URL=${template/id}'


Cheers,
 Joerg




--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] defunct process with os.spawn*

2006-08-03 Thread Alan

Guys, I must say that I really appreciate your attention, that's
pretty cool to have such a nice people to give support to newbies like
me.

Based on what got here I found a solution that worked for me:

pid_test,st=os.waitpid(jpid,os.WNOHANG)

Now, let's go for the next trouble...

Cheers,
Alan

On 02/08/06, Chris McDonough [EMAIL PROTECTED] wrote:

You need to call os.waitpid() at some point to clean up finished
processes.

- C

On Aug 2, 2006, at 1:59 PM, Jonathan wrote:


 - Original Message - From: Alan [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Wednesday, August 02, 2006 1:52 PM
 Subject: [Zope] defunct process with os.spawn*


 Dears,

 Now I am facing an annoying problem.

 I have an application in Zope which calls a External Method, which
 calls a bash script via:

 var_pid = os.spawnlp(os.P_NOWAIT, 'script.sh', 'script.sh',
 arg1,arg2)

 The idea is to start some programs in background (which will take
 hours running) and I need to pass arguments and track its PID for
 eventually checking its status. So os.spawnlp seemed the perfect
 solution.

 However, when my bash script finished, my processes gets defunct
 childed to the Zope process. And only restarting Zope to get rid of
 such defunct process, an unthinkable solution.

 It sounds like you are generating zombie processes (child processes
 which have completed, but are not handled by the processes that
 spawned them). Try googling:  python reap spawned process


 Jonathan


 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )






--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] defunct process with os.spawn*

2006-08-02 Thread Alan

Dears,

Now I am facing an annoying problem.

I have an application in Zope which calls a External Method, which
calls a bash script via:

var_pid = os.spawnlp(os.P_NOWAIT, 'script.sh', 'script.sh', arg1,arg2)

The idea is to start some programs in background (which will take
hours running) and I need to pass arguments and track its PID for
eventually checking its status. So os.spawnlp seemed the perfect
solution.

However, when my bash script finished, my processes gets defunct
childed to the Zope process. And only restarting Zope to get rid of
such defunct process, an unthinkable solution.

I am running:

Plone 2.1.2,
Zope (Zope 2.8.5-final, python 2.3.5, sunos5),
Python 2.3.5 (#1, Feb 14 2006, 10:51:41) [C],
--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] button to submit with several parameters and call python script

2006-08-01 Thread Alan

Hi Dears,

I am looking for ideas of how to use a submitting button to pass
several parameters to a python script.

I have googled but I found different solutions not really appropriate
to my case I guess.

I was trying something like this:

 form action=do_status.py method=POST
  input type=hidden name=jname:string
  input type=hidden name=juser:string
  input type=submit value=Submit
 /form

Then I defined my do_status.py with parameters jname, juser


print jname, juser
return printed


and nothing is printed.

But what I would like was something like clicking on a button I would
call a specific python script with parameters, eg:
span tal:content=python: here.do_status(jname,juser)

Any help here would be very appreciated. Many thanks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] button to submit with several parameters and call python script

2006-08-01 Thread Alan

Thanks guys, but I got another solution that worked (after some hours googling).

input type=hidden name=juser tal:attributes=value juser

Cheers,
Alan

On 02/08/06, David H [EMAIL PROTECTED] wrote:

Alan wrote:

 Hi Dears,

 I am looking for ideas of how to use a submitting button to pass
 several parameters to a python script.

 I have googled but I found different solutions not really appropriate
 to my case I guess.

 I was trying something like this:

  form action=do_status.py method=POST
   input type=hidden name=jname:string
   input type=hidden name=juser:string
   input type=submit value=Submit
  /form

 Then I defined my do_status.py with parameters jname, juser

 print jname, juser
 return printed


Try print context.REQUEST.get('jname','???')

 and nothing is printed.

David





--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] DB in Zope

2006-07-24 Thread Alan

Hi!

I need a very simple DB in Zope, a table with 5 columns, less than 100
entries, to write, read and update, nothing else. Is Gadfly a serious
option? Do l loose my database if Zope is restarted? Which other
option, easy to use? A tutorial?

Many thinks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] default webpage after External Method script executed

2006-07-21 Thread Alan

Thanks a lot for your reply.

Both ways worked for me with a little modification, I had to remove 'context'.

return self.Status.index_html(**options)
return self.REQUEST.RESPONSE.redirect('index_html?submit=ok')

Cheers!
Alan

On 20/07/06, Andreas Jung [EMAIL PROTECTED] wrote:



--On 20. Juli 2006 20:48:16 +0200 Tino Wildenhain [EMAIL PROTECTED]
wrote:

  return
  self.context.REQUEST.RESPONSE.redirect(some_url_plus_query_string)

 valid but very ugly. Why not just return the result of the call of a
 template?

You might be interested have the original page under the original URL.
So a redirection is fine.


 e.g. return self.zpt_or_whatever_template()

 Or do all the form work in a python script anyway, which calls
 the external method when everything looks ok and returns
 with the template as above.


THis also work...depends on your usecase and requirements

-aj






--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] default webpage after External Method script executed

2006-07-20 Thread Alan

Hi!

My simple webpage for submitting files is ok. It calls a External
Method script to do all the dirty job. However, I am running out of
ideas of how to get back to my default submitting web page after
submitting a file (and thus execute the script).

Any idea would be very welcome.
Thanks in advance.
Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] external method with import tarfile

2006-07-19 Thread Alan

Hi there!

I managed to find the problem and the solution.

First, I've forgot to mention that in my script, oname is an uploaded file.
I just inserted a f.close() and voilá!

def upload_external(self,file,REQUEST):
  import os,tarfile
...
  f=open(oname,wb)
  f.write(file.read())
  f.close()
...
  tar = tarfile.open(oname,r:gz)
  for itar in tar:
  tar.extract(itar.name,jobdir)
  return Done

Cheers,
Alan

On 18/07/06, Alan [EMAIL PROTECTED] wrote:

Thanks for your reply.

Yes, my script works and my file are not broken. I am using mac osx
tiger 10.4.7, zope 2.9.3 and python 2.4.2.

Cheers,
Alan

On 18/07/06, Andreas Jung [EMAIL PROTECTED] wrote:


 --On 18. Juli 2006 16:12:18 +0100 Alan [EMAIL PROTECTED] wrote:
 
  Error Type: IOError
  Error Value: CRC check failed
 
 

 This is unlikely a Zope issue. Either your tar file is broken or the
 tarfile module is broken. Check if your code runs without Zope as a
 simple PythonScript..there is nothing about Zope involved in your issue.

 -aj




--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
http://www.bio.cam.ac.uk/~awd28




--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] external method with import tarfile

2006-07-18 Thread Alan

Hi!

I am trying to run a external python script. Now I am facing a problem
that occurs only when I run the script via Zope.

...
import os,tarfile
...
 tar = tarfile.open(oname,r:gz)
 for itar in tar:
  tar.extract(itar.name,jobdir)

gives me:
Site Error

An error was encountered while publishing this resource.

Error Type: IOError
Error Value: CRC check failed

If I comment the for loop my scripts finish well, but then it does not
uncompress the file.

Please, any help would very appreciated. Many thanks in advance,

Cheers,
Alan


--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] TCP CLOSE_WAIT leaks

2006-04-04 Thread Alan Milligan
Dieter Maurer wrote:

 Looks as if your Python were compiled without debugging symbols.
 You will get much better tracebacks (easier to understand),
 when you rebuild your Python with debugging symbols.

But of course, it's a production system :( - temporarily installing
python-debuginfo ...

 
 The following GDB macros can be used to help in the analysis.
 pfr can be called in frames eval_frame to learn
 about the Python frame.
 
 def ps
 x/s ({PyStringObject}$arg0)-ob_sval
 end
 

Dieter, I don't know where you manage to find this stuff!!

Have stuck it in my .gdbinit and am knocking myself out with it...

Cheers, Alan

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] TCP CLOSE_WAIT leaks

2006-04-02 Thread Alan Milligan
Dieter Maurer wrote:
 Alan Milligan wrote at 2006-3-28 10:44 +1000:

 A missing clearing down of the client's connection cannot be the 
 cause for this. The (worker) thread must finish (and you
 should see a log entry) long before this connection is expected to
 be closed. The problem you observe seems to indicate a problem
 inside your request processing. Activating the debuglogger
 (or similarly spelled) can prove whether or not this assumption
 is correct.
 

You are correct.  It appears that all the threads are blocked on a
lock.acquire() call (possibly three given the memory addresses) :

[EMAIL PROTECTED] tmp]# strace -fp `cat /opt/zope2.8/instance/var/Z2.pid`
Process 12814 attached with 23 threads - interrupt to quit
[pid 12788] futex(0x83560c0, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12790] futex(0x83560c0, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12798] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12802] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12803] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12806] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12808] futex(0x83560c0, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12809] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12810] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12795] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12813] futex(0x83560c0, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12807] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12804] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12800] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12797] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12812] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12796] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12805] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12814] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12799] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12792] futex(0xa993760, FUTEX_WAIT, 0, NULL unfinished ...
[pid 12801] futex(0x93e7f50, FUTEX_WAIT, 0, NULL unfinished ...


I tried to take Paul's advice to use gdb to get a python stacktrace, but
gbd wouldn't let me:

(gdb)  call PyRun_SimpleString(import sys, traceback;
sys.stderr=open('/tmp/tb','w',0); traceback.print_stack())

Program received signal SIGSTOP, Stopped (signal).
[Switching to Thread -1469408336 (LWP 31487)]
0x00a527a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use set unwindonsignal on
Evaluation of the expression containing the function (malloc) will be
abandoned.


So, setting unwindonsignal 


(gdb) set unwindonsignal on
(gdb)  call PyRun_SimpleString(import sys, traceback;
sys.stderr=open('/tmp/tb','w',0); traceback.print_stack())

Program received signal SIGSTOP, Stopped (signal).
[Switching to Thread -1259328592 (LWP 31465)]
0x00a527a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
The program being debugged was signaled while in a function called from GDB.
GDB has restored the context to what it was before the call.
To change this behavior use set unwindonsignal off
Evaluation of the expression containing the function
(PyRun_SimpleString) will be abandoned


The best I could do was a good old-fashioned where ...


(gdb) where
#0  0x00a527a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00cb4a24 in [EMAIL PROTECTED] () from /lib/tls/libpthread.so.0
#2  0x0099842c in ?? () from /usr/lib/libpython2.3.so.1.0
#3  0x0096f04e in PyThread_acquire_lock () from /usr/lib/libpython2.3.so.1.0
#4  0x009722f7 in _PyObject_GC_Del () from /usr/lib/libpython2.3.so.1.0
#5  0x0091b921 in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
#6  0x0094e63f in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
#7  0x009501b6 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#8  0x0094ee6b in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
#9  0x0094fa65 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
#10 0x0094fa65 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
#11 0x009501b6 in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#12 0x0090be4e in PyFunction_SetClosure () from /usr/lib/libpython2.3.so.1.0
#13 0x008f8627 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#14 0x008ffdb8 in PyMethod_New () from /usr/lib/libpython2.3.so.1.0
#15 0x008f8627 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#16 0x008f8824 in PyObject_CallMethod () from /usr/lib/libpython2.3.so.1.0
#17 0xb7b3762b in ?? () from
/opt/zope2.8/lib/python/persistent/cPersistence.so
#18 0xa67cf3cc in ?? ()
#19 0xb7b3900a in ?? () from
/opt/zope2.8/lib/python/persistent/cPersistence.so
#20 0xb7b39008 in ?? () from
/opt/zope2.8/lib/python/persistent/cPersistence.so
#21 0x9c10776c in ?? ()
#22 0xb786cce8 in ?? () from
/opt

Re: [Zope-dev] TCP CLOSE_WAIT leaks

2006-03-29 Thread Alan Milligan
I managed to get a DeadlockDebugger trace on this thing, it made very
interesting reading:

Thread -1578087504 (GET
/VirtualHostBase/http/www.last-bastion.net:80/BastionLedger/ledgerlist/Mail_338253076):
  File /opt/zope2.8/lib/python/ZServer/PubCore/ZServerPublisher.py,
line 23, in __init__
response=response)
  File /opt/zope2.8/lib/python/ZPublisher/Publish.py, line 387, in
publish_module
environ, debug, request, response)
  File /opt/zope2.8/lib/python/ZPublisher/Publish.py, line 188, in
publish_module_standard
response = publish(request, module_name, after_list, debug=debug)
  File
/opt/zope2.8/lib/python/Products/PlacelessTranslationService/PatchStringIO.py,
line 51, in new_publish
x = Publish.old_publish(request, module_name, after_list, debug)
  File /opt/zope2.8/lib/python/ZPublisher/Publish.py, line 114, in publish
request, bind=1)
  File /opt/zope2.8/lib/python/ZPublisher/mapply.py, line 88, in mapply
if debug is not None: return debug(object,args,context)
  File /opt/zope2.8/lib/python/ZPublisher/Publish.py, line 40, in
call_object
result=apply(object,args) # Type scr to step into published object.
  File /opt/zope2.8/lib/python/Shared/DC/Scripts/Bindings.py, line
311, in __call__
return self._bindAndExec(args, kw, None)
  File /opt/zope2.8/lib/python/Shared/DC/Scripts/Bindings.py, line
329, in _bindAndExec
def _bindAndExec(self, args, kw, caller_namespace):
  File /opt/zope2.8/lib/python/Shared/DC/Scripts/Bindings.py, line
348, in _bindAndExec
return self._exec(bound_data, args, kw)
  File /opt/zope2.8/lib/python/Products/CMFCore/FSPageTemplate.py,
line 195, in _exec
result = self.pt_render(extra_context=bound_names)
  File /opt/zope2.8/lib/python/Products/CMFCore/FSPageTemplate.py,
line 134, in pt_render
result = FSPageTemplate.inheritedAttribute('pt_render')(
  File /opt/zope2.8/lib/python/Products/PageTemplates/PageTemplate.py,
line 104, in pt_render
tal=not source, strictinsert=0)()
  File /opt/zope2.8/lib/python/TAL/TALInterpreter.py, line 202, in
__call__
def __call__(self):
  File /opt/zope2.8/lib/python/Products/PageTemplates/ZRPythonExpr.py,
line 47, in __call__
return eval(code, g, {})
  File Python expression putils.createTopLevelTabs(actions), line 1,
in expression
  File /opt/zope2.8/lib/python/Products/CMFPlone/PloneTool.py, line
701, in createTopLevelTabs
default=data['name'])
  File
/opt/zope2.8/lib/python/Products/CMFPlone/TranslationServiceTool.py,
line 35, in utranslate
return utranslate(*args, **kw)
  File /opt/zope2.8/lib/python/Products/CMFPlone/i18nl10n.py, line 53,
in utranslate
return service.utranslate(*args, **kw)
  File
/opt/zope2.8/lib/python/Products/PlacelessTranslationService/PlacelessTranslationService.py,
line 133, in utranslate
if not service: return default
  File /opt/zope2.8/lib/python/ZODB/Connection.py, line 704, in setstate
self._setstate(obj)
  File /opt/zope2.8/lib/python/ZODB/Connection.py, line 760, in _setstate
self._reader.setGhostState(obj, p)
  File /opt/zope2.8/lib/python/ZODB/serialize.py, line 495, in
setGhostState
state = self.getState(pickle)
  File /opt/zope2.8/lib/python/ZODB/serialize.py, line 488, in getState
return unpickler.load()
  File /opt/zope2.8/lib/python/ZODB/serialize.py, line 436, in
_persistent_load
return self._conn.get(oid)
  File /opt/zope2.8/lib/python/ZODB/Connection.py, line 216, in get
return obj
  File /opt/zope2.8/lib/python/ZEO/ClientStorage.py, line 746, in load
return self.loadEx(oid, version)[:2]
  File /opt/zope2.8/lib/python/ZEO/ClientStorage.py, line 781, in loadEx
return data, tid, ver

*every* thread was block-waiting on zeo (from a wide range of different
Zope/Plone types)!  It looks to me like Apache has timed out, clearing
down it's end, Zope however is still having to wait for zeo which is
completely borked.

I've consequently ditched zeo and everything is again well-behaved.

Alan

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] TCP CLOSE_WAIT leaks

2006-03-27 Thread Alan Milligan
Dieter Maurer wrote:

I've been noticing a situation for some time that my 2.8.5 Z2 is running
out of threads.  When doing an lsof on it, I see a large number of TCP
handles in CLOSE_WAIT state.

It seems something's not properly clearing down the connection to
release the thread.
 
 
 I doubt that this is the case.
 
   The IO, including the closing of the connection, is
   handled by the ZServer thread. This is a single thread.
   You would immediately observe should it block (Zope would
   be irresponsive).
 

This *is* exactly the behaviour I'm observing.

   When the connection is closed, the Zope worker thread has
   already been released. By the way, their number is fixed
   (and usually small).

Unfortunately, the server is out of threads and I can't use
DeadlockDebugger to see what exactly Z2 thinks each thread is doing.

As these threads have not completed, there's no access log entry, and
the other socket terminal has obviously closed, meaning I can't chase
the issue down from the other end either.

I've upgraded a lot of software, and this issue is present on 2.8.6 as
well.  I'm confident this issue is with Zope (or more likely, a badly
behaving product) - it manifests with httpd-2.0.54, and
httpd-2.2.0-5.1.2 (both forked and worker implementations).

Any ideas on how to track it down??

Alan

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] TCP CLOSE_WAIT leaks

2006-03-21 Thread Alan Milligan
Hi,

I've been noticing a situation for some time that my 2.8.5 Z2 is running
out of threads.  When doing an lsof on it, I see a large number of TCP
handles in CLOSE_WAIT state.

It seems something's not properly clearing down the connection to
release the thread.

Unfortunately, these connections were almost guaranteed to have been set
up via Apache redirect processing, and it's quite successfully cleaned
up its end ...

Does anyone have any idea how this situation might occur, and why Zope's
not properly housekeeping these (maybe Medusa needs a timeout set on
close waits??)

Alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: svn.zope.org borked

2005-12-20 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jens,

I have the latest subversion-1.2.3-4 compiled for python2.3.  I am happy
to make them available to you if you wish.

Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDp/1gCfroLk4EZpkRAg9jAKCAUkIuyhK1q7mrCiscfxpSM7tMwACeLt3J
WIn0K8ovArTGMtcKnO+MOCw=
=oFtk
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] optimised python

2005-12-17 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm reconsidering the way we RPM package byte-code compiled python, and
although I suspect optimised python is a bit of an anacronysm, I thought
I'd check with the list ;)

If one was to start Zope with python -O, then it would look for (and
generate) .pyo files instead of .pyc's in all the Products right?

Would there be any performance gain by this change?  How much?

Is it worth me doing byte-compiles with -O and starting Zope's
interpreter in this mode?

Alan


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDpQWqCfroLk4EZpkRAlPzAJ90GRzBC7MxpvnkFBkNvcEuwn71LgCfUDB5
PgOhpCiGveqHdNQx/cABRrw=
=8P0/
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Python2.4 Security Audit ETA???

2005-11-28 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

Aeons ago someone promised that said Zope security audit of Python 2.4
was scheduled for October.  I've not yet seen any happy announcements
that Zope is now 2.4 compliant, and do want to highlight the importance
of achieving this goal.

Python2.4 has been out for almost a year now, and it's fairly
ubiquitous.  There've been many statements made on this list about
people quite happily running their Zope's - contrary to white hat advice.

With the major distro's, Python is entrenched in their installer and gui
processes and *all* packaging is focused around a single python (2.4 for
everyone excepting our BastionLinux).

In reality it is infeasible to support a second version of Python for
Z2.  Many modules have SWIG bindings (while core Z2 doesn't require much
of this, a number of products do), requiring multiple package versions -
build systems cannot cope with this scenario without massive spec
customisations (which is all pointless given the window of this
requirement - and of course that we've all actually learnt something for
python2.5, python2.6 )

We are getting an increasing number of people attempting to load
incompatible packages.  It is not possible to downgrade python.  Most of
userland is not competent to get a secondary python2.3 installation
running - especially when packages such as python-ldap are simply not
available for their old python and new ldap etc etc which all requires
custom package builds.

We are also stuck in a time-warp actually having to back-port a large
proportion of recent linux packages because we'd like to make new
features available, increasing costs and testing requirements.  It is
also no longer possible for customers to subscribe to just a single
channel because our core is substantially different to their chosen
vendor's installation, and packages will be installed into meaningless
python paths etc.

Can someone please give me an ETA on this, so I can decide if and how to
support zope in light of other pressing linux requirements for our distro.


Alan


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDi/JXCfroLk4EZpkRAlGgAKC1ZjYut1GG55TlxUyVxtD1y+YLKgCg1IV6
vsT9SOOBMUxBP4i1qo7+7q0=
=MuMS
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] Render a string as tal

2005-11-18 Thread Alan Warren
On 11/18/05, Chris Withers [EMAIL PROTECTED] wrote:
 Alan Warren wrote:
  single image into a folder.  So, I have a folder called view.  When an
  image is viewed the URL looks like
  /some_album/some_pic.jpg/view/?display=large
 
  The code looks like this:
  span tal:define=imgName python:request['URL2'][len(request['URL3']+1:]
  span tal:define=global imgObj python:path('here/'+imgName)/span
  /span

 ouch.

Thanks.

 This is really contorted. Why do you use URL2 and URL3?

To extract just the id of the image being viewed.  The relative path
from the template that presents the image to the image being presented
will always match that pattern.


 Is imgObj not just 'here' anyway?
Not in a manner I could easily work with, view is a folder containing
index_html (the page template in question), and a handful of other
page templates and scripts -- all of which are specific actions a user
may wish to perform on a single image -- rather than on a whole album.

Given the scenario I've outlined, do you have another suggestion?
I agree this isn't aesthetically pleasing, but to me it was quite intuitive.


 What is the page template where this code comes from called?
/view/index_html


 Why do you do a global define?
Because I'm godless.


 Why two define statements instead of just one?
So as to not post a massively long line of code to the list that would
be even more spaghetti like.  If it makes you feel any better the
actual code is more in the form:
div tal:define=long_line here
!-- code that works on imgObj properties, --
/div

The question I was trying to answer wasn't about some coding style
issue, but rather about how to convert a string path to an object at
run-time.  I included the URL manipulation as an illustration of when
I had to use the path method.

Cheers,
Alan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Render a string as tal

2005-11-16 Thread Alan Warren
Hi,

I'm not sure I entirely understand the goal here either, but you may
want to look into the path method.

Here's what I recently had to use it for.

I'm building a little photo album application for my sister, it
supports nested albums.  I had a page template called view I was using
as a method, but wanted to logically group the actions specific to a
single image into a folder.  So, I have a folder called view.  When an
image is viewed the URL looks like
/some_album/some_pic.jpg/view/?display=large

If I want to do operations or locate properties on some_pic.jpg I
extract that part of the URL, and then pass it to the path function.

The code looks like this:
span tal:define=imgName python:request['URL2'][len(request['URL3']+1:]
span tal:define=global imgObj python:path('here/'+imgName)/span
/span

HTH,
Alan

On 11/16/05, Chris Withers [EMAIL PROTECTED] wrote:
 Mark Gibson wrote:
  However, what I'm looking for is being able to take a string such as
  'div tal:content=here/absolute_urlThe url/div'
 
  and be able to evaluate the TALES expression in the string to produced
  something like: 'divhttp://mydomain.com/theUrl/div'
 
  Any chance there's a recipe for this?

 If you can explain to us why you think you want to do that, we can
 likely tell you what you really want to be doing ;-)

 Chris

 --
 Simplistix - Content Management, Zope  Python Consulting
 - http://www.simplistix.co.uk

 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] 3rd party product migrations

2005-08-26 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

We're now migrating our product stack to Zope2.8/Plone2.1 and have been
considering how best to proceed with this.

We have one overriding objective in that we're very interested in
reducing the window between core releases and third party developers
making new releases both now and into the future.

To this end, we've set up a development channel, synonymous with Rawhide
for those familiar with Redhat/Fedora release management practices.
Using yum or up2date, you can access this channel at
https://linux.last-bastion.net/RPC2/up2date/development to transparently
upgrade to the latest core.  We will be producing regular releases of
things Zope and Plone into the future here.

At this stage, you do need to create an account on the portal as you
need to be Authenticated to download.

The Zope2.8/Plone2.1 packages happily sit alongside older installations.

If you're an author of anything on
https://linux.last-bastion.net/RPC2/up2date/plope, we're particularly
keen upon getting you involved.

If you've a Plope product you'd like to get put on this channel, then
please do feel free to contact us.  We're hoping to grow the list of
successfully migrated packages as quickly as possible.

We of course realise that the Zope and Plone landscape is diverse, both
in terms of finding source code, and operating system environments, but
if you're even remotely interested in packaging, or have something to
say, please feel free to subscribe to
[EMAIL PROTECTED]

Cheers, Alan

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDDv8KCfroLk4EZpkRAkyUAJ92Ydp6nX+7uyoBQEv/+Qg96NceGQCgk7Dt
nslcj7V7konlwbDMyAxYWU4=
=glS5
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] BastionLinux

2005-05-19 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

We're finally almost ready to release BastionLinux,
https://linux.last-bastion.net, our exact functional equivalent of RHEL
for commercial Zope and Plone customers.

We have packaged quite a number of Python/Zope/Plone products on the
Plope channel, https://linux.last-bastion.net/RPC2/up2date/plope.

If we haven't talked to you already and you are the author of any of
these, then we'd like to hear from you.

We will soon be releasing our extra's RPM package workflow, so we'd also
like to hear from you if you've any commercially orientated products
you'd like to earn revenue for as well.

If you support commercial customers, then we're also very interested in
getting feedback from you about our reselling model.

Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFCjMk5CfroLk4EZpkRAopfAKDMpW7nD4Zhi+4gEC+MCTFPtjV0XgCfVbNn
pFt7m9gSPJUZXYlklBoKgv8=
=E4f5
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] CMF TypesTool breaks id

2005-04-15 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm astounded that nobody has come across this before, but the
CMFCore.TypesTool.constructContent() function is supposed to return the
object id in the event that no RESPONSE is passed in - at least
according to CMFPlone.PloneFolder.invokeFactory().
Presently, it in fact returns nothing - breaking this implicit contract.
This has the unfortunate effect of *NOT* allowing you to generate your
own object id within your object construction function (we have a number
of requirements where external systems expect to see id's of particular
formats and I don't want to depend upon/pollute the generateId script
with specific meta_type requirements).
Plone's createObject script can't find this newly constructed object as
it's id isn't that generated by the generateId script and fails trying
to do a getTypeInfo() call on a None object.
I'm posting the patch here because in my mind this *IS* a very important
patch and I find the release schedule for CMF{Core,Default} inextricable ;)
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFCX+AzCfroLk4EZpkRAq8tAKCVoo1JRfsueciFsJGg4WfMT2sqTgCgoyDF
5XtSXJ1IGopWx0FVQ2kct1M=
=MgKf
-END PGP SIGNATURE-
--- CMFCore/TypesTool.py.orig   2005-04-16 01:04:05.181168664 +1000
+++ CMFCore/TypesTool.py2005-04-16 00:58:19.661695608 +1000
@@ -712,6 +712,7 @@
 immediate_url = '%s/%s' % ( ob.absolute_url()
   , info.immediate_view )
 RESPONSE.redirect( immediate_url )
+   return ob.getId()
 
 security.declarePrivate( 'listActions' )
 def listActions( self, info=None ):
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope] Re: CMFSin time errors

2005-04-05 Thread alan runyan
MILLER Eva wrote:
Hi,
I'm getting some errors with certain feeds, but not others, in CMFSin. 
The errors seem to have something to do with the portaltime and 
localized time. Someone suggested changing the permissions for anonymous 
to fix this. Doing that made all my feeds malfunction, so that's not the 
right answer.

I know CMFSin is old and it seems to be getting flaky. But I really need 
an aggregator for my project, and it doesn't seem like there's anything 
much better out there right now.

SyntaxError: Tue, 05 Apr 2005 14:21:06 EDT
in the ZMI click Help - Zope API - DateTime read the information
about DateTime; its very picky about the parsing of strings.  I cant
remember if that is a valid time for RSS.
--
Alan Runyan
http://www.enfoldsystems.com/
p. +1.713.942.2377
f. +1.832.201.8856
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] Parrot

2005-03-21 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
| ZEO, multiple clients and processor affinity settings already offer
| this, and with no extra development needed...
|
What userland tools are you using to implement processor affinity??
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFCP5NrCfroLk4EZpkRAiXAAKCN8+JKtnzxR1yHUE83Qud88DzwkACeOzWo
cmcK+vUjCigvSoVBe+j0AR8=
=8I62
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Parrot

2005-03-18 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Parrot 0.1.2 was released a couple of weeks ago.  According to the
release notes, there's now better python support, separated into
dynaclasses.
Unfortunately, I haven't really managed to keep up with the Parrot
project, but I think it quite possibly represents the strategic future
of Zope.
An obvious benefit is the genuine concurrency it offers over GIL on SMP
hardware.  Anyone running an enterprise Zope or Plone installation would
desire to take advantage of this.
I know a year or so ago, someone received a pie in the face at a
conference because Parrot still wasn't as fast as the native Python
interpreter, but maybe this too has changed with this release.
I'm very interested to know if anyone is investigating Parrot.
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFCO4vpCfroLk4EZpkRAsVVAKCQBlffkkhd86BX/KxwJcYSXPx5pwCfdiU8
Ybnu4zF97xG8SSYxYUY64I8=
=KzS4
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] root ZServer

2005-01-19 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
S.Aeschbacher wrote:
| You can solve this problem by using sudo. Make an external method that
| executes sudo with the commands you want (you have to use the NOPASSWD
| option to prevent sudo for asking for a password). This gives you both,
| zope running as a non privileged user and your rpm commands running
as root.
|
check out mach ( http://thomas.apestaart.org/projects/mach/) ...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFB7iHhCfroLk4EZpkRAmL4AJ9J7DnBTJ6YlbkWvR5k6vrrYIUrSgCgpb5F
qHJp0lOn1dyB04fWLSaHwv0=
=Ifk0
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] root ZServer

2005-01-18 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I have a requirement to run a root uid Z2 process and was most surprised
to see that line 334 of Zope/Startup/__init__.py expressly forbids this,
throwing a ZConfig.ConfigurationError
While it's not a good idea to configure Zope to run as root by default,
isn't it completely fascist to disallow it altogether?  Similarly, I'd
now expect issues if I chose to attach a Z2 to a low port.
As far as I'm concerned, the account policy (and port too) is clearly
defined by directives in zope.conf and should be honoured - clearly
someone's consciously made these configuration changes and is thus fully
accepting of their potential consequences.
How about relaxing this requirement?
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFB7d+hCfroLk4EZpkRAuBaAKCm7PnRFMDtBBVft59L5FD4gIUdfQCgtXP0
1Qi8jv96rjUGRsI/x15Rty8=
=P0J4
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] root ZServer

2005-01-18 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Andreas Jung wrote:
| There is zero need to relax this requirement. You only have to start
| Zope as root
I just explained you cannot start as root ...
| to get port 80 but it is in general not a good idea for *any* service to
| run
| as root for security reasons. So there is absolutely no reason to *not*
| changing
| the the uid of the process to a user with less permissions.
Says you!!
I happen to be using zope to wrap a number of excellent Python rpm
packaging scripts/modules (eg yum, mach), and as part of this process,
need to do rpm package installs from the zope server which obviously
requires root access.
I see no reason why I should be penalised for using the excellent
workflow features of Zope in a system programming environment.
If Zope is to be useful to the widest cross community, we really MUST
stop this 'we know best' attitude and allow people at the coalface to
override default behaviour as only they are in a position to evaluate
the appropriateness of the 'security reasons'.
How about a 'yes' response this time.
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFB7fiFCfroLk4EZpkRAoDZAJ40UveUjpBGyN0/1VnUmZUQz0GctgCfa+R1
tvE2RP5DNwa2IlEmMmX2l0g=
=JNQg
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] FS PageTemplates and XML generation issues

2004-12-22 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I have some PT skins I'm using to generate XML responses and am getting
some strange behaviour.  I'm not sure if its because I misunderstand
something, there are bugs, or the API could be made more useful.
I will focus this discussion around the following ZPT:
?xml version=1.0 encoding=UTF-8?
repomd xmlns=http://linux.duke.edu/metadata/repo;
~  data type=other tal:repeat=source here/objectValues
tal:attributes=type source/meta_type
~location href= tal:attributes=href string:repodata/${source/id}/
~checksum type=sha tal:content=source/checksum/
~timestamp tal:content=source/timestamp/
~open-checksum type=sha tal:content=source/open_checksum/
~  /data
/repomd
What is happening with this is that it's not doing any TAL rendering at
all and just returning this 'raw' xml.  However, if I customise my skin
and assure the content-type is text/html, then it indeed renders this 'xml'.
I have experimented with the xmlns on this to no avail.  Besides, it
surely must be implicit in the choice of making this a FSPT, that I am
anticipating TAL/METAL rendering, and that any non-(ME)TAL tags in the
raw text are to be passed thru to the client...
I am also concerned that the FSPT code has implicitly assumed that the
content type is text/xml.  While I'd prefer this to be the type, at this
stage, this choice does not work ...
I would however have thought that in lieu of an explicit statement, any
FSPT would be of type text/html...
This brings me to my other question:  how do I set the content-type on
an FSPT??  It would seem that content-type=xxx in the [default] section
of the .metadata file is ignored.
I'd someone to comment upon my observations before investigating further.
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFByS4YCfroLk4EZpkRAk+pAKCZKz6swAiPjCASlYeTRNr1aayhjQCgqvMs
tAhtC2jRk9mOPsA3ObH3Ow0=
=/vDj
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] FS PageTemplates and XML generation issues

2004-12-22 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Florent Guillaume wrote:
|
| ZPT will process tal instructions in XML templates only if the proper
| namespace is declared. You must have:
|
|   xmlns:tal=http://xml.zope.org/namespaces/tal;
|
Ok, I've explicitly included this now as well, and it behaves properly :)
What is the rationale for this behaviour??  Is there any situation
whereby I would NOT expect this namespace to be present implicitly??  If
this were so, there'd be no dynamic content in my XML and I'd simply
choose to store it on the ZODB as a File ...
| Use:
|
| [default]
| content_type = text/foobar
No, this doesn't work either :(
Regards, Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFByY6bCfroLk4EZpkRArjcAKC7XHjydBxHoaMdtignZfQ8zP3MLwCgieBP
3dDpu6TQ26k3Pcfiswg88A0=
=ZeNO
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] FS PageTemplates and XML generation issues

2004-12-22 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Florent Guillaume wrote:
| | Use:
| |
| | [default]
| | content_type = text/foobar
|
| No, this doesn't work either :(
|
|
| Well it should, there are unit tests in CMFCore that explicitely test
| this kind of .metadata file.
|
No, I had a look and there's a strange test with a FSPT which explicitly
sets the REQUEST content-type.  There's no test which checks this from a
.metadata file.  There is a test which checks the title in a .properties
file.
I extended these tests (test_DirectoryView.py) and indeed setting
content_type as a property does pass the test.  I also added a .metadata
test and it actually does pass this test too, although .metadata and
.properties files do appear mutually exclusive.
I've attached the patch of these tests if you want to apply it.
So, now I can't explain why my real-world .metadata content_type is
being ignored!
Cheers, Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFByaZvCfroLk4EZpkRAkibAKCOHPMge3kaoT9nqDJMiDnc75g2+wCfTjK1
aFEDZCvkqQ8oiCi+oFrD7sc=
=wgyp
-END PGP SIGNATURE-
diff -Naur tests.orig/fake_skins/fake_skin/testPT2.pt tests/fake_skins/fake_skin/testPT2.pt
--- tests.orig/fake_skins/fake_skin/testPT2.pt	1970-01-01 10:00:00.0 +1000
+++ tests/fake_skins/fake_skin/testPT2.pt	2004-12-23 03:45:59.000568152 +1100
@@ -0,0 +1 @@
+div tal:replace=request/SERVER_NAME /
\ No newline at end of file
diff -Naur tests.orig/fake_skins/fake_skin/testPT2.pt.metadata tests/fake_skins/fake_skin/testPT2.pt.metadata
--- tests.orig/fake_skins/fake_skin/testPT2.pt.metadata	1970-01-01 10:00:00.0 +1000
+++ tests/fake_skins/fake_skin/testPT2.pt.metadata	2004-12-23 03:40:28.149865104 +1100
@@ -0,0 +1,3 @@
+[default]
+title=Zope Pope
+content_type=text/foobar
diff -Naur tests.orig/test_DirectoryView.py tests/test_DirectoryView.py
--- tests.orig/test_DirectoryView.py	2004-12-23 03:31:18.220467080 +1100
+++ tests/test_DirectoryView.py	2004-12-23 03:47:10.077762776 +1100
@@ -123,6 +123,11 @@
 Make sure the directory view is reading properties
 self.assertEqual(self.ob.fake_skin.testPT.title, 'Zope Pope')
 
+def test_metadata(self):
+Make sure the directory view is reading properties
+	self.assertEqual(self.ob.fake_skin.testPT2.content_type, 'text/foobar')
+self.assertEqual(self.ob.fake_skin.testPT2.title, 'Zope Pope')
+
 def test_ignored(self):
  Test that the .test1.py is ignored 
 assert('#test1' not in self.ob.fake_skin.objectIds())
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Why third_party/docutils?

2004-12-17 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
And while we're talking about docutils, the delivered Reporter
warning/error functions write directly to STDOUT.
We have ReST functionality in Zpydoc, and we get loads and loads and
loads of crap 'invalid unindent' messages streamed to STDOUT from the
Zpydoc demo site.
Zope is supposedly a background server, there is very little need to be
doing this.  Anyone for turning this down???
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBwpIXCfroLk4EZpkRAgpjAJ9L49MfYuuXKEkaI2VQRfXWgJ/d1gCeIq+d
wXwjrOhHMdGfvU0/HITJrZQ=
=6Qnj
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope and Python 2.4

2004-11-10 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I followed the thread a week or so ago with great interest, in that
substantially Zope is working with Python 2.4
However, RedHat have now released Python 2.4 in the Fedora development
stream and it will ship with FC4.
Does ZC have an official position upon this yet?
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBkh2XCfroLk4EZpkRAk7ZAKCOEPXWHID+xbF2eO8NO9eHVoaI9wCeO/9s
WOh4ZLgVBDpQy4hYmDm3qsk=
=4QF1
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope and Python 2.4

2004-11-10 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The reason I asked this question is because clients I talk to in the
enterprise space are almost all exclusively RH9/RHEL clients, and many
have major reservations about installing anything non-RH 'approved' as
they feel they have some security assurances using this, and certainly
RH are reasonable sincere with their efforts here.
If ZC say Zope is approved and test with version X of Python, then this
too has some weight in their minds.
We have our own distro and stability within the flux of Zope, Plone and
a large number of enterprise-targeted products is probably the major
sales pitch.
However, having to fork off the main Fedora branch in regard to Python
dependencies (which directly affect Anaconda, up2date, GTK, and most of
the desktop applets) has major implications for how we maintain our distro.
So, I ask again, what is the official view on Python 2.4, and if there's
a roadmap as to when it will become blessed.
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBklA2CfroLk4EZpkRAltZAJ9cCQAMH6HtB2Jo58wZEdoD2t+dlwCgqQUF
tLxEApntyi0zbmyb7BqVWQg=
=BD09
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Announce: FSPerlScript

2004-10-31 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
This patch is against CMF-1.4.7, although one could equally argue it
better suited elsewhere - there appear to me to be minor uncomfortable
dependencies regardless of where it sits (unless it's made an
independent product - which seems a little unwarranted given it's
simplicity).
This patch includes the following:
~   FSPerlScript.py
~   images/fspl.gif(needs an artiste to draw a padlock!)
~   tests/test_FSPerlScript.py
~   tests/fake_skins/fake_skin/test1.pl
~   tests/fake_skins/fake_skin/test2.pl
~   __init__.py  (FSPerlScript registration)
Unfortunately, FSPerlScript is not quite as useful as I'd anticipated,
given that the 'use' statement is a restricted opcode.
I am more than willing to discuss with any interested party(s) how we
may implement a security mechanism whereby we can specify 'safe' Perl
modules, much as we do with the Python modules_allow stuff.
Cheers, Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBhLGxCfroLk4EZpkRAtr6AKDCvDnf1gglfN7xrCW/eEZu0bvOowCfb3Wc
BkRbevjQM1X20IbvgC6kCFw=
=yHdw
-END PGP SIGNATURE-
diff -Naur CMFCore/FSPerlScript.py CMFCore.fsperl/FSPerlScript.py
--- CMFCore/FSPerlScript.py	1970-01-01 10:00:00.0 +1000
+++ CMFCore.fsperl/FSPerlScript.py	2004-10-31 19:59:21.396419752 +1100
@@ -0,0 +1,114 @@
+##
+#
+# Copyright (c) 2004 Zope Corporation and Contributors. All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+# 
+##
+ Customizable Python scripts that come from the filesystem.
+
+$Id: FSPerlScript.py,v 1.21.4.3 2004/04/23 21:11:33 sidnei Exp $
+
+import Globals, re
+from AccessControl import ClassSecurityInfo, getSecurityManager
+from Products.PerlMethod import PerlMethod, FuncCode
+from Shared.DC.Scripts.Script import Script
+from ComputedAttribute import ComputedAttribute
+
+from utils import _dtmldir
+from CMFCorePermissions import ViewManagementScreens, View, FTPAccess
+from DirectoryView import registerFileExtension, registerMetaType, expandpath
+from FSObject import FSObject
+
+from OFS.Cache import Cacheable
+
+#
+# Python regexps really f**k me off - this should parse multiline text in one hit!
+#
+#parameter_re = re.compile(r'''^##(title|parameters)=(.+)$''', re.MULTILINE | re.DOTALL)
+parameter_re = re.compile(r'''^##(title|parameters)=(.+)$''')
+
+_marker = []
+
+class FSPerlScript (FSObject, PerlMethod):
+FSPerlScripts act like Perl Scripts but are not directly
+modifiable from the management interface.
+
+meta_type = 'Filesystem Script (Perl)'
+
+manage_options=(
+{'label':'Customize', 'action':'manage_main'},
+{'label':'Test', 'action':'manage_try'},
+) + Cacheable.manage_options
+
+__ac_permissions__ = FSObject.__ac_permissions__ + PerlMethod.__ac_permissions__
+
+# Use declarative security
+_security = ClassSecurityInfo()
+_security.declareObjectProtected(View)
+_security.declareProtected(View, 'index_html',)
+
+_security.declareProtected(ViewManagementScreens, 'manage_main')
+manage_main = Globals.DTMLFile('custpy', _dtmldir)
+
+def _createZODBClone(self):
+Create a ZODB (editable) equivalent of this object.
+obj = PerlMethod(self.getId(), self.title, self.args(), self.read())
+return obj
+
+def _readFile(self, reparse):
+Read the data from the filesystem.
+
+Read the file (indicated by exandpath(self._filepath), and parse the
+data if necessary.
+
+fp = expandpath(self._filepath)
+file = open(fp, 'r')
+try: data = file.read()
+finally: file.close()
+# note we ignore reparse flag and ALWAYS reparse file ...
+title = ''
+args = ''
+for line in data.split('\n'):
+match =  parameter_re.search(line)
+if match:
+k,v = match.groups()
+if k == 'title':   title = v
+else:  args = v
+self.manage_edit(title, args, data)
+
+# force delegation to __call__
+index_html = None
+
+def __call__(self, *args, **kw):
+'''Calls the script.'''
+self._updateFromFS()
+return PerlMethod.__call__(self, *args, **kw)
+
+_security.declareProtected(ViewManagementScreens, 'read')
+def read(self):
+self._updateFromFS()
+return self.code

Re: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3= ??

2004-10-12 Thread Alan Milligan
Heh,

Yes - would you like to lobby RedHat to change their up2date client??

I think the reason they've done this is because it's much more efficient.  Not only do 
they not have to read the body, they don't have to parse it.

Also, xml-rpc is totally screwed because it doesn't have a file type, and the normal 
binary limitation is 8192 bytes of parsable data between two tags :(

Alan

 Hi,

 Am Di, den 12.10.2004 schrieb Alan Milligan um 0:16:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Hi,
 
  I had a client that used to work on 2.7.0, and now doesn't on 2.7.3.
 
  The problem would appear to be that it's not substituting the
  xmlrpc.Response class for a GET request on a text/xml content type and
  therefore just delegating to the str() function instead of wrapping it
  in the xml-rpc xml response tags.
 
  I'm a little confused about this, as this only appears to happen in
  HTTPRequest::processInputs which didn't seem to be invoked for my
  xml-rpc call anyway ...
 
  tcpdump follows for the sceptics ...
 
  j..
  08:05:04.901469 IP mistress.balclutha.org.34257 
  mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767
  nop,nop,timestamp 225097763 225097723
  [EMAIL PROTECTED]@.)..W.x...
  j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1
  Host: localhost:8080
  Accept-Encoding: identity
  x-client-version: 1
  x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc
  (version 1.40)
  x-up2date-version:
  user-agent: rhn.rpclib.py/$Revision: 1.40 $
  x-rhn-transport-capability: follow-redirects=1
  x-rhn-auth-channels: ['mail', '1']
  content-type: text/xml
  x-info: RPC Processor (C) Red Hat, Inc (version 1.44)

 Your log is a bit confusing maybe you better use tcpflow
 for dumping. But what is clearly seen is the GET request.
 I wonder how this ever was supposed to work since
 XML-RPC requires an entidy body for the message (which is
 in XML). You can compare with RFC2616 - there is no
 entidy body in GET. Your client needs to use POST.
 I suspect then it should work.

 Regards
 Tino





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3 ??

2004-10-12 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Tino Wildenhain wrote:
|
|I had a client that used to work on 2.7.0, and now doesn't on 2.7.3.
|
|The problem would appear to be that it's not substituting the
|xmlrpc.Response class for a GET request on a text/xml content type and
|therefore just delegating to the str() function instead of wrapping it
|in the xml-rpc xml response tags.
|
| I wonder how this ever was supposed to work since
| XML-RPC requires an entidy body for the message (which is
| in XML). You can compare with RFC2616 - there is no
| entidy body in GET. Your client needs to use POST.
| I suspect then it should work.
|
Ok, I now more fully understand the subtlety of this explanation.
What happened here is that in cgi.py's FieldStorage class, since this is
a GET request, it completely ignores the CONTENT_TYPE environment and
sets the content-type header to x-www-form-urlencoded.
According to Dave Winer's spec at http://www.xmlrpc.com/spec, XML-RPC is
supposed to be HTTP-POST based, where this issue is fully resolved.
I have implemented this GET 'Extension' with this patch.
I appreciate that supporting 'unofficial' extensions to protocols is not
something we want to encourage, but is there any chance of getting this
patch into zope core (ever)?
Cheers, Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBbIWLCfroLk4EZpkRAlX3AKDI5Cdb6CUfdkqtSrEllfZeEGEnMwCdHJN0
78EIcOvXOD2H4imuI2NQOxw=
=H+yj
-END PGP SIGNATURE-
--- HTTPRequest.py	2004-10-13 11:22:32.212653472 +1000
+++ HTTPRequest.py.orig	2004-10-13 11:20:51.146017936 +1000
@@ -385,11 +385,9 @@
 fs=FieldStorage(fp=fp,environ=environ,keep_blank_values=1)
 if not hasattr(fs,'list') or fs.list is None:
 # Hm, maybe it's an XML-RPC
-if ((fs.headers.has_key('content-type') and
- fs.headers['content-type'] == 'text/xml' and
- method == 'POST') or
-		(environ.get('CONTENT_TYPE','') == 'text/xml' and
-		 method == 'GET')):
+if (fs.headers.has_key('content-type') and
+fs.headers['content-type'] == 'text/xml' and
+method == 'POST'):
 # Ye haaa, XML-RPC!
 global xmlrpc
 if xmlrpc is None: import xmlrpc
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] serving BLOBs

2004-10-11 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I know serving large BLOBs is rather frowned up using Z2, but I have a
requirement to use the zope security machinery prior to serving a blob
circa 500Mb.
I thought I'd just wrap it in an ExternalFile and it would simply stream
to the client.  In fact I was even anticipating taking advantage of
chunked transfer encoding for HTTP1.1 clients.
However, I'm getting out of memory exceptions thrown by the server.
This would indicate that no intermediate buffer flushing is occuring at all!
What am I missing?
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBap9OCfroLk4EZpkRAlsPAJ9oztRXnAH8rGzeLY7+hlXKkXB4yQCfQ64I
OXcuPhHJmn3V+5y/HDQEN2M=
=7YAX
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] serving BLOBs

2004-10-11 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Johan Carlsson wrote:
|
| I've looked at the code of the latest release of ExternalFile
| and I can't find the new streming interface being used at all?
|
There's some strange stuff in the ExternalFile::FileUtils::copy_file()
function whereby it writes 65565 byte chunks via the Response object,
ZServer::ZServerHTTPResponse.
This guy automatically sets streaming for writes with content size less
than  128K.
I would have expected to the ZServerHTTPResponse's stdout attribute to
automatically flush on write(), but maybe not!
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBaqeiCfroLk4EZpkRAirFAJ9gMJLRhcJiJN+0vPbAVYb4iMpf4gCfZosl
EXrzHTIHdsXa+C82pDND/W8=
=043z
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3 ??

2004-10-11 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I had a client that used to work on 2.7.0, and now doesn't on 2.7.3.
The problem would appear to be that it's not substituting the
xmlrpc.Response class for a GET request on a text/xml content type and
therefore just delegating to the str() function instead of wrapping it
in the xml-rpc xml response tags.
I'm a little confused about this, as this only appears to happen in
HTTPRequest::processInputs which didn't seem to be invoked for my
xml-rpc call anyway ...
tcpdump follows for the sceptics ...
j..
08:05:04.901469 IP mistress.balclutha.org.34257 
mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767
nop,nop,timestamp 225097763 225097723
[EMAIL PROTECTED]@.)..W.x...
j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1
Host: localhost:8080
Accept-Encoding: identity
x-client-version: 1
x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc
(version 1.40)
x-up2date-version:
user-agent: rhn.rpclib.py/$Revision: 1.40 $
x-rhn-transport-capability: follow-redirects=1
x-rhn-auth-channels: ['mail', '1']
content-type: text/xml
x-info: RPC Processor (C) Red Hat, Inc (version 1.44)

08:05:04.901498 IP mistress.balclutha.org.zope 
mistress.balclutha.org.34257: . ack 456 win 32767 nop,nop,timestamp
225097763 225097763
[EMAIL PROTECTED]@.x.W.
j.#
08:05:04.910507 IP mistress.balclutha.org.zope 
mistress.balclutha.org.34257: P 1:871(870) ack 456 win 32767
nop,nop,timestamp 225097772 225097763
[EMAIL PROTECTED]@..x.W.
j.#HTTP/1.1 200 OK
Server: Zope/(Zope 2.7.3b1-0, python 2.3.3, linux2) ZServer/1.1 Plone/2.0.4
Date: Mon, 11 Oct 2004 22:05:04 GMT
Content-Length: 690
Content-Type: text/plain
[['EnchantMail', '2.0.0', '4', '', 'i386', '121577', 'mail'],
['courier', '0.47', '1', '', 'i386', '4172641', 'mail'],
['courier-imapd', '0.47', '1', '', 'i386', '400894', 'mail'],
['courier-ldap', '0.47', '1', '', 'i386', '109401', 'mail'],
['courier-maildrop', '0.47', '1', '', 'i386', '1178663', 'mail'],
['courier-maildrop-wrapper', '0.47', '1', '', 'i386', '0', 'mail'],
['courier-mlm', '0.47', '1', '', 'i386', '250756', 'mail'],
['courier-pop3d', '0.47', '1', '', 'i386', '115327', 'mail'],
['courier-smtpauth', '0.47', '1', '', 'i386', '257063', 'mail'],
['courier-webadmin', '0.47', '1', '',
~ 'i386', '22047', 'mail'], ['courier-webmail', '0.47', '1', '',
'i386', '970798', 'mail']]08:05:04.910534 IP
mistress.balclutha.org.34257  mistress.balclutha.org.zope: . ack 871
win 32767 nop,nop,timestamp 225097772 225097772
[EMAIL PROTECTED]@.+..W...Y.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBawY2CfroLk4EZpkRAmtFAKDVLmORsmw6LacIUizLNn111t1J+wCffq7w
3Pbm2RrCvIFKlkxuUg1BDaA=
=MbC0
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3= ??

2004-10-11 Thread Alan Milligan


 According to the CHANGES.txt there were no changes to XMLRPC.

xmlrpc.py is not faulty, it's just that an HTTPResponse object is assigned to the 
text/xml content type rather than the correct xmlrpc.Request :(



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Plone-developers] Re: Five and 2.9

2004-06-15 Thread alan runyan
 Alan, does that address your concerns?

 Just understand that the Five approach is still being developed, so
 there's nothing to adopt yet. :)  But I certainly encourage folks to
 participate and help Martijn figure out what the approach should be.

Raphael, I think its great that Jim responded. Now we (collectively)
need to get some usage out of Five.

Jim, Thanks for explaining ZC's position re: FrankenZope or backporting
CA into Zope2.  One of the big questions that I believe is open is how to
use more of zope.app in Zope 2 - specifically Schema/Widgets.  I heard
that Zope Corp. is using this in some projects.

So - I asked if people to do some CMF/Plone implementation of Views
in certain aspects.  I am up for creating a Supplement to Plone to bolts on
some of the technologies and uses it.  Maybe specifically using it for
doing in-place versioning.  I urge the communities to use Plone or maybe a
fork of it (or the CMF) to be a playground.  Like Idle forked to land some
major features for Python.  Then it can be integrated back into subsequent
projects.

-- 
Alan Runyan
Enfold Systems, LLC. - Principal
Plone/Zope Training, Products, and Consulting
http://www.enfoldsystems.com/
p. +1.713.942.2377
f. +1.832.201.8856


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] XML-RPC incorrect 404 return code

2004-05-06 Thread Alan Milligan
Hi,

I'm doing some stuff using Zope as an XML-RPC server, and have come 
across a rather interesting bug.

If the method doesn't exist on the Zope server, Zope returns an 
xmlrpclib.Fault with a faultCode= -1. 

This completely trips out my XML-RPC client which was rather expecting 
an xmlrpclib.ProtocolError.

Does anybody have a strong opinion on sorting out ZPublisher.xmlrpc.py 
to to do a little more than it's present rather lame error handling??

Alan

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] ZScheduler

2004-03-31 Thread Alan Milligan
Hi,

Following on from work started at the Zope3 Sprint in Melbourne, I've 
got a release candidate for a Zope scheduler.  This is available from 
http://www.last-bastion.net/ZScheduler, where although the documentation 
is a little light, I've taken efforts to write online helps, although 
it's all reasonably intuitive.

This is an attempt at delivering a definitive solution to this issue, 
and I'm keen to get community feedback as to what additionally is required.

Since I personally am much more familiar with Z2 than Z3, there's only a 
Z2 release candidate at this stage - once the prescribed functionality 
is agreed I will produce a Z3 port (well - if I can't find any 
volunteer(s) ;) ...).

If anybody associated with the recently released ZopeScheduler product 
(or any other competing product) is listening to this list, could they 
please make an effort to coordinate with me about the longer-term 
incantation of both as it's a little pointless not having a single 
answer to this utility.

Cheers, Alan



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] CMF dogbowl dog tired ???

2004-03-04 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I see not much has been happening on cmf.zope.org for some time - the
content is still to be merged with zope.org
Even more worrying, the collector also shows no movement.  I raised 2
one-line fixes (bugs 196, 197) on Oct 19 2003 - they are still pending
along with 89 others.
How about looking at this stuff - or giving us CVS access.

Cheer, Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.3.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Comment:
iD8DBQFARyo+CfroLk4EZpkRAlkWAKCJYhic9OnL/9gSKUA+48BF1dOe/gCcDbI6
Ni0me/OyQh5Ydy2Ao6J2JEA=
=xK5V
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


  1   2   >